Closed
Bug 807613
Opened 12 years ago
Closed 12 years ago
Option to choose if placeholder should disappear when text input has focus
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: brunoaiss, Assigned: mounir)
References
Details
Attachments
(1 file, 1 obsolete file)
5.00 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Because this change to the placeholder behavior was sugested and accepted, I'd like to request an option in the about:config that allows the firefox user to change the behavior as follows: 0 (default): Works like the way it works currently. (Only disappear the placeholder when there's user input text). 1: If the tag has an autofocus attribute and it is set to true, then do the same as 0, else do the same as 2. 2: Behave like the versions before the 15 branch, where the placeholder is removed from the form tag if the user selects the tag. If such system already exists, then my apologies because I wasn't able to find it by searching.
Updated•12 years ago
|
Component: DOM: Core & HTML → Layout: Form Controls
Assignee | ||
Comment 1•12 years ago
|
||
I'm not strongly against that but I'm not sure if this is a very good idea. Our current behaviour is the default behaviour in most of our tier-1 platforms: Android, MacOS X, somehow Window (we should check W8) and Firefox OS [1]. The only platform that clearly doesn't do that by default is GTK (Linux). I don't want to have such a preference if the general default behaviour becomes consistent. Actually, I might prefer changing the behaviour to match the platform's one instead of adding a spec. I feel like fighting against that behaviour when your platform has it is probably not worth it. Generally speaking, I'm afraid that we have to maintain these two code paths while one could be barely not used. [1] We want Firefox OS to behave like that because it is obviously better for mobile platforms.
I already know many firefox users that prefer it like it was. I strongly believe that it would be changed to a non default by a significant amount of firefox users (as long as this change, should it be made, is properly announced). Personally, I prefer the option 1 of my proposal but hardcoding that one is not a good idea at all. One of the best things of firefox is to have loads of tweaks that allows you to set it to behave exactly like you want it to. Hardcoding a something like this is against that policy. I hope they didn't change that policy of firefox...
Assignee | ||
Comment 3•12 years ago
|
||
After a bit of thinking I realized that it was quite easy to do by centralizing the placeholder visibility logic (bug 809584). Also, given that we moved to a pseudo-element, this patch becomes easy. With this patch, setting "dom.placeholder.show_on_focus" to "false" should do what you want.
Assignee: nobody → mounir
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #679322 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Severity: minor → normal
Priority: P3 → --
Target Milestone: mozilla19 → ---
Version: 16 Branch → Trunk
Assignee | ||
Comment 4•12 years ago
|
||
Oups, I attached the patch without the test. That one has a test so we don't break that pref's behaviour too quickly.
Attachment #679322 -
Attachment is obsolete: true
Attachment #679322 -
Flags: review?(bzbarsky)
Attachment #679325 -
Flags: review?(bzbarsky)
Comment 5•12 years ago
|
||
Comment on attachment 679325 [details] [diff] [review] Patch I can't find UpdatePlaceholderVisibility. What does the argument to it mean?
Comment 6•12 years ago
|
||
Comment on attachment 679325 [details] [diff] [review] Patch Oh, bug 809584 and aNotify. r=me
Attachment #679325 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #6) > Comment on attachment 679325 [details] [diff] [review] > Patch > > Oh, bug 809584 and aNotify. What do you mean by "and aNotify"?
Comment 8•12 years ago
|
||
I had two questions: 1) What is this function and 2) What does the argument to it mean? The answers are "bug 809584 and aNotify". ;)
Assignee | ||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fdb059f5ae6
Flags: in-testsuite+
Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → mozilla19
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1fdb059f5ae6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 11•12 years ago
|
||
It's not what I asked but the solution works for me, it's acceptable according to what I asked. From what I understood you implemented what I indicated of 0 and 2. So I don't thin kit is fixed, I think this is another solution but it works for me. Thanks for the patch, Mounir Lamouri and Ehsan Akhgari
Resolution: FIXED → WORKSFORME
Assignee | ||
Comment 12•12 years ago
|
||
WORKFORME is used when a bug can't be reproduced. The solution is indeed not the one you proposed but it is doing more or less what you asked and it matches the summary of the bug.
Resolution: WORKSFORME → FIXED
Comment 13•12 years ago
|
||
@Mounir Lamouri, I would strongly advise that you make the 2nd option the default ! Please, seriously, the disappear when starting to type is wrong and annoying. The user always expects the text to be removed before they start typing. You first click the area to type. Then you look at your keyboard to see the letters you want to type. Who cares that the text disappears or not when you look at your keyboard !? Why must the text be there till you start typing.. Why see the text till the point when you start typing...? Its not like you forget what it was written there ..... I really cannot see how on earth could the firefox developers be so silly including such a stupid feature in firefox. I am sure there must be at least thousands of users disturbed by this "improvement". Please consider my words........ https://bugzilla.mozilla.org/show_bug.cgi?id=758996
Comment 15•12 years ago
|
||
Adjusting summary to reflect what was changed here.
Summary: Option to choose if placeholder should disappear when text input is clicked → Option to choose if placeholder should disappear when text input has focus
You need to log in
before you can comment on or make changes to this bug.
Description
•