Closed Bug 827727 Opened 12 years ago Closed 12 years ago

[BB] Input areas: Remove reset button from input when the input is not on :focus but is :valid

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g18 verified)

VERIFIED FIXED
Tracking Status
b2g18 --- verified

People

(Reporter: pivanov, Assigned: pivanov)

References

Details

(Whiteboard: interaction, uxbranch, BerlinWW, landed in uxbranch, qa-verified, QARegressExclude)

Attachments

(2 files)

Attached image The bug!
No description provided.
Whiteboard: interaction, uxbranch, BerlinWW
Assignee: nobody → pivanov
Attached file patch
Attachment #699051 - Flags: feedback?(igonzaleznicolas)
Blocks: 827697
Attachment #699051 - Flags: feedback?(igonzaleznicolas) → feedback+
Summary: [BB][input_areas] - remove reset button from input when the input is not on :focus but is :valid → [BB] Input areas: Remove reset button from input when the input is not on :focus but is :valid
Whiteboard: interaction, uxbranch, BerlinWW → interaction, uxbranch, BerlinWW, landed in uxbranch
Checked out contacts, Mail app, and a few other apps. Seems like it fixed an issue where clearing a field might clear more than 1 field as well...
Whiteboard: interaction, uxbranch, BerlinWW, landed in uxbranch → interaction, uxbranch, BerlinWW, landed in uxbranch, qa-verified
Yep this should be done per each app separately because in the [BB] we don't want to have any JS.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: interaction, uxbranch, BerlinWW, landed in uxbranch, qa-verified → interaction, uxbranch, BerlinWW, landed in uxbranch, qa-verified, QARegressExclude
This fix regressed the behaviour of the reset button in the e-mail app (which was previously too wacky) so that it does not reset anything, resulting in bug 833300. This does not appear to regress the contacts app because of somewhat weird logic landed in bug 827697. The selector that causes the reset button to be displayed/active is: form p input:focus + button[type="reset"] { opacity: 1; pointer-events: all; } The key thing is that the button only accepts mouse events when the "input" is focused; attempting to 'click' on the button will take the focus away from the "input", causing "pointer-events: none;" to apply again. contacts deals with this in communications/contacts/js/contacts_form.js by adding a bubbling 'mousedown' listener that interecepts mousedown on "button" tags of type "reset", assuming previousElementSibling is an "input", and clearing its "value". The whole widget idiom seems like something better handled by gecko with a XBL binding, but even if we have to just approximate it in content, using CSS that requires use of a 'mousedown' handler and precludes a 'click' handler seems incorrect. Since type='reset' is semantically incorrect because it wants to reset the whole form anyways and requires JS logic, perhaps we should just leave the enablement issue of the button up to JS logic entirely?
Blocks: 833300
Hey Andrew, I think this one is also related 830127
(In reply to Pavel Ivanov [:ivanovpavel] from comment #5) > Hey Andrew, > I think this one is also related 830127 Yes, bug 830127 would seem to be a suitable follow-up location for this; I'll move my subsequent discussion there. Thanks!
No longer blocks: 833300
verified : Master build : 2013-03-26-07-02-04 "mozilla-central" revision="28b048ffb7a7" "integration/gaia-central" revision="44f6a17f24d4" "gecko.git"revision="a800f14ea7022a78966f7fe14a9b0d11c569b151" "gaia.git" revision="ace1eb32a313da1232bbdf9cff2581a4b036356d" Gecko http://hg.mozilla.org/releases/mozilla-b2g18/rev/28b048ffb7a7 Gaia ace1eb32a313da1232bbdf9cff2581a4b036356d BuildID 20130326070204 Version 18.0 Unagi
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: