Closed
Bug 613973
Opened 14 years ago
Closed 14 years ago
Do not hide the invalid form popup if the user types in the invalid form control
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 4.0b9
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file, 1 obsolete file)
5.24 KB,
patch
|
dao
:
review+
limi
:
ui-review+
sicking
:
approval2.0+
|
Details | Diff | Splinter Review |
This has been requested by limi some time ago.
I'm not sure if that's what you want but I'm going to write a patch which will remove the popup as soon as the form control becomes valid to prevent situations were the user did what had to be done but still see the message.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #492342 -
Flags: ui-review?(limi)
Attachment #492342 -
Flags: review?(dao)
Attachment #492342 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Summary: Do not remove the invalid form popup if the user types in the invalid form control → Do not hide the invalid form popup if the user types in the invalid form control
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #492342 -
Attachment is obsolete: true
Attachment #492345 -
Flags: ui-review?(limi)
Attachment #492345 -
Flags: review?(dao)
Attachment #492345 -
Flags: approval2.0?
Attachment #492342 -
Flags: ui-review?(limi)
Attachment #492342 -
Flags: review?(dao)
Attachment #492342 -
Flags: approval2.0?
Comment 3•14 years ago
|
||
Comment on attachment 492345 [details] [diff] [review]
Patch v1.1
>+ let blurHandler = function(e) {
> gFormSubmitObserver.panel.hidePopup();
> };
function blurHandler() {
gFormSubmitObserver.panel.hidePopup();
}
>+ let inputHandler = function(e) {
>+ if (e.originalTarget.validity.valid) {
>+ gFormSubmitObserver.panel.hidePopup();
>+ }
>+ };
function inputHandler(event) {
if (event.currentTarget.validity.valid) {
gFormSubmitObserver.panel.hidePopup();
}
By the way, I don't understand why all this is in browser.js, i.e. front-end code, rather than several levels lower where the handling of HTML and form features belongs, with some very lightweight interface for the browser to display the panel.
Attachment #492345 -
Flags: review?(dao) → review+
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3)
> Comment on attachment 492345 [details] [diff] [review]
> Patch v1.1
>
> By the way, I don't understand why all this is in browser.js, i.e. front-end
> code, rather than several levels lower where the handling of HTML and form
> features belongs, with some very lightweight interface for the browser to
> display the panel.
Because that's not related to the content/HTML. The submission of the form is related to the content/HTML but not how an invalid submission should be handled. Depending of the browser/Gecko consumers, I would expect different handling. For example, Fennec might want to use its form manager.
In addition, it guarantees us that a browser that is not handling an invalid submission will not block the submission. Indeed, I've introduced an event for the invalid form submission and submissions aren't blocked if there are no observers for this event (thus, we do not break Fennec for example).
Comment 5•14 years ago
|
||
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 492345 [details] [diff] [review] [details]
> > Patch v1.1
> >
> > By the way, I don't understand why all this is in browser.js, i.e. front-end
> > code, rather than several levels lower where the handling of HTML and form
> > features belongs, with some very lightweight interface for the browser to
> > display the panel.
>
> Because that's not related to the content/HTML. The submission of the form is
> related to the content/HTML but not how an invalid submission should be
> handled. Depending of the browser/Gecko consumers, I would expect different
> handling. For example, Fennec might want to use its form manager.
Maybe it's because I don't understand what Fennec using its form manager implies, but I don't see why a browser would want to handle this very bug differently. The browser should just be notified when it should show or hide the UI, whatever that UI might be. Having front-end code listen to blur and input events on content nodes seems like a poor and fragile solution.
Comment 6•14 years ago
|
||
Comment on attachment 492345 [details] [diff] [review]
Patch v1.1
Clearing approval flag until reviews are complete.
Attachment #492345 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Whiteboard: [passed-try][needs-review]
Comment 7•14 years ago
|
||
Comment on attachment 492345 [details] [diff] [review]
Patch v1.1
Works for me!
Attachment #492345 -
Flags: ui-review?(limi) → ui-review+
Attachment #492345 -
Flags: approval2.0+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [passed-try][needs-review] → [passed-try][needs-landing]
Assignee | ||
Comment 8•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [passed-try][needs-landing]
Target Milestone: --- → Firefox 4.0b9
Updated•14 years ago
|
Comment 9•14 years ago
|
||
So, I just tried this with an <input type=email required>. If you try to submit the form, you are prompted "Please fill out this field". As you start typing, the message remains until you type out something containing an @ and a . (since it's type=email). I don't think that's correct behaviour. I'd prefer:
a) the old behaviour, when you only get the tooltip on the actual submit
b) the message should remain for as long as the original error remains
c) the message should update dynamically as you type
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #9)
> So, I just tried this with an <input type=email required>. If you try to submit
> the form, you are prompted "Please fill out this field". As you start typing,
> the message remains until you type out something containing an @ and a . (since
> it's type=email). I don't think that's correct behaviour. I'd prefer:
> a) the old behaviour, when you only get the tooltip on the actual submit
The old behavior was bad. I don't think reverting to it is a good idea.
> b) the message should remain for as long as the original error remains
> c) the message should update dynamically as you type
I don't know which one might be the best between b and c. Probably c because it will help the user as long as the field isn't valid.
And thanks for this report! :)
Assignee | ||
Comment 11•14 years ago
|
||
I have open bug 623870 for the follow-up.
You need to log in
before you can comment on or make changes to this bug.
Description
•