Closed Bug 1349213 Opened 8 years ago Closed 8 years ago

Right curly brace in password field erases it (Ublock origin)

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

52 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: hamilyon, Unassigned, NeedInfo)

References

()

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20170317212642 Steps to reproduce: Go to website with password field, e.g. https://bugzilla.mozilla.org Put cursor to password field, enter some characters, then press shift+] Actual results: Content to password field is replaced with one symbol Expected results: Password field has one more symbol in it.
Linux, Ff 52.0.1 (64-bit), only extension is Ublock origin. Disabling ublock origin helps. This behavior reproduces on any website. Reproduces with different keyboard layout, e.g. Ъ in russian layout. Reproduces with left curly brace "{" too. Does not reproduce in latest chrome. Copying and pasting is fine.
Whiteboard: [sec-insecure-third-party-site-reviewed]
I tried with FF55 on Win 7, I can't reproduce it. I installed uBlock Origin (only that, no adblocking lists) and I tested on various password fields. On my French keyboard, I need to type AltGr + ] or } to display ] or }. Is it reproducible with a fresh profile where you install only uB? https://support.mozilla.org/t5/Install-and-Update/Use-the-Profile-Manager-to-create-and-remove-Firefox-profiles/ta-p/2914
Flags: needinfo?(hamilyon)
I haven't had any success reproducing this issue on Ubuntu 16.04 with either FF 55.0a1 20170323110205 or FF 52.0.1 20170316213829. - (standard keyboard - EN-US and RO, new profile + ublock installed only) Either we are missing some steps or you have something other than uBlock origin that is adding to the mix.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Further testing showed that this bug occurs only if I press tab or shift-tab to switch to text field prior to entering text. Ublock origin is not involved, password fields are not involved too. It is simply that I always press tab to navigate to password field. Sorry for confusion. Reproduces on fresh install of Ff 53.0a1 without plugins.
Flags: needinfo?(hamilyon)
Thanks Alexander for the update. I still cannot reproduce, but i think we're still missing a step here. In your imgur post, between your input "123445" and "Shift+}" there's something else happening, if you look carefully it looks like a space or something, just before the entire text is replaced with }. I cannot catch that, to rephrase it - for me the text looks like 123445}, in your post, it looks like 123445 }
Flags: needinfo?(hamilyon)
Yes, that is space, I typed it. No confusion here.
Flags: needinfo?(hamilyon)
(In reply to Alexander from comment #7) > Yes, that is space, I typed it. No confusion here. I was hoping you are doing something extra, but apparently with the info that is available now, it is not enough to reproduce it. As I'm looking again at the imgur post, it looks like just before you shift+}, the entire text gets selected, but I have no clue how to reproduce it, might it be that you are using some custom key bindings? or some app. that has this effect? - if not I'm running out of ideas :(.
Flags: needinfo?(hamilyon)
I imported the gif into Gimp to be able to see frame by frame, and I believe what is happening is that somehow the field loses focus and then gains it back immediately, causing the text in the field to be selected, and hence the next character input replaces the whole field. So now the question is why does the field loses/gains focus when typing shift + ].
I appreciate your help. Trying to supply any additional info that i can gather. This reproduces on two different machines, and two versions of firefox. Both machines are laptops with recent ubuntu/unity. Not heavily customized, just basic keyboard setup to support russian layout. They are customized in the same way of course -) Tried to run $ xev -root Each time i press '}', it displays this with little variations FocusIn event, serial 21, synthetic NO, window 0xd8, mode NotifyGrab, detail NotifyInferior KeymapNotify event, serial 21, synthetic NO, window 0x0, keys: 1 0 0 0 4 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ConfigureNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, (-1,2), width 2, height 1076, border_width 0, above 0xe00009, override YES MapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, override YES ConfigureNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, (2,-1), width 1916, height 2, border_width 0, above 0xe00006, override YES MapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, override YES ConfigureNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, (1919,2), width 2, height 1076, border_width 0, above 0xe00008, override YES MapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, override YES ConfigureNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, (2,1079), width 1916, height 2, border_width 0, above 0xe00007, override YES MapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, override YES FocusOut event, serial 21, synthetic NO, window 0xd8, mode NotifyUngrab, detail NotifyInferior UnmapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, from_configure NO UnmapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, from_configure NO UnmapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, from_configure NO UnmapNotify event, serial 21, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, from_configure NO So, i see suspicious "focus in" and "focus out" events. I tried this in separate xev window, and sure here they are: KeyPress event, serial 37, synthetic NO, window 0x5000001, root 0xd8, subw 0x0, time 332348787, (265,111), root:(330,163), state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False FocusOut event, serial 37, synthetic NO, window 0x5000001, mode NotifyGrab, detail NotifyAncestor FocusIn event, serial 37, synthetic NO, window 0x5000001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 37, synthetic NO, window 0x0, keys: 2 0 0 0 8 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KeyPress event, serial 37, synthetic NO, window 0x5000001, root 0xd8, subw 0x0, time 332348971, (265,111), root:(330,163), state 0x11, keycode 35 (keysym 0x7d, braceright), same_screen YES, XLookupString gives 1 bytes: (7d) "}" XmbLookupString gives 1 bytes: (7d) "}" XFilterEvent returns: False It clearly seems that those events happen in empty window too, just before '}' keypress. Trying this in chrome: FocusOut event, serial 22, synthetic NO, window 0xd8, mode NotifyUngrab, detail NotifyInferior UnmapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, from_configure NO UnmapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, from_configure NO UnmapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, from_configure NO UnmapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, from_configure NO FocusIn event, serial 22, synthetic NO, window 0xd8, mode NotifyGrab, detail NotifyInferior KeymapNotify event, serial 22, synthetic NO, window 0x0, keys: 7 0 0 0 8 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ConfigureNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, (-1,2), width 2, height 1076, border_width 0, above 0xe00009, override YES MapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00006, override YES ConfigureNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, (2,-1), width 1916, height 2, border_width 0, above 0xe00006, override YES MapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00008, override YES ConfigureNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, (1919,2), width 2, height 1076, border_width 0, above 0xe00008, override YES MapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00007, override YES ConfigureNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, (2,1079), width 1916, height 2, border_width 0, above 0xe00007, override YES MapNotify event, serial 22, synthetic NO, window 0xd8, event 0xd8, window 0xe00009, override YES "focus in" and "focus out" events are there. So, if workaround exists, it might be in getting rid of those events. I searched in my shortcuts and cannot find anything like shift+something, but it still could be a bug like this https://bugs.launchpad.net/gnome-settings-daemon/+bug/1244090 Firefox should handle focus in out gracefully. I live in my browser and recently switched to Firefox.
Flags: needinfo?(hamilyon)
Component: Untriaged → Event Handling
Product: Firefox → Core
From what I see this bug is affecting a wide range of linux distros, mainly gnome based. I don't think there's anything Firefox can do, since IMHO is an OS issue and not a Firefox one. But let's see an opinion from the people that own event handling.
Whiteboard: [sec-insecure-third-party-site-reviewed]
Hi Olli and Stone, Could any of you chime in and advise if there's anything we could do and confirm comment 11? Thanks!
Flags: needinfo?(sshih)
Flags: needinfo?(bugs)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #12) > Hi Olli and Stone, > Could any of you chime in and advise if there's anything we could do and > confirm comment 11? Thanks! Agree with comment 11. I didn't see any info obviously we can use to differentiate whether it's caused by OS issues or by user actions.
Flags: needinfo?(sshih)
Flags: needinfo?(bugs)
(In reply to Ming-Chou Shih [:stone] from comment #13) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #12) > > Hi Olli and Stone, > > Could any of you chime in and advise if there's anything we could do and > > confirm comment 11? Thanks! > Agree with comment 11. I didn't see any info obviously we can use to > differentiate whether it's caused by OS issues or by user actions. That means we close it as INVALID?
Hmm, I cannot reproduce this bug even with en-US keyboard layout on Ubuntu 17.04. However, when I operate key or mouse button in password field, I see a lot of errors: > (/<path to firefox>:56104): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Permission denied. dconf will not work properly.
(In reply to Masayuki Nakano [:masayuki] from comment #15) > However, when I operate key or mouse button in password field, I see a lot > of errors: > > > (/<path to firefox>:56104): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Permission denied. dconf will not work properly. This error occurs only when I use GNOME. So, I don't see this error with Unity.
Alexander: Could you get log and attach it to this bug? You can get a log with MOZ_LOG_FILE=~/fx.log MOZ_LOG=nsGtkIMModuleWidgets:4,KeymapWrapperWidgets:4,sync It's enough to do following steps: 1. Load a page having a password field *without* keyboard (to avoid noise). 2. Type '}' in a password field. 3. Close Firefox with mouse. Be careful, it logs all input characters into the file. So, don't type anything your privacy (e.g., actual password). You can attach the log file to this bug from the link, "Attach File", in this page. Please do not paste it as comment.
Flags: needinfo?(hamilyon)
Thank you for the report. If you can find the time to supply the log from comment 18, please re-open.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.