Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Uncaught TypeError: cannot read property 'has' of undefined(...) : onKeyDown @ menubar.js:160 #7055

Closed
luixxiul opened this issue Feb 4, 2017 · 13 comments

Comments

@luixxiul
Copy link
Contributor

luixxiul commented Feb 4, 2017

Describe the issue you encountered:
When I hit the down arrow of my keyboard on URL bar, I get this error on devtool console:

Uncaught TypeError: cannot read property 'has' of undefined(...)
    onKeyDown @ menubar.js:160

I cannot reproduce the error with the fresh profile.

  • Platform (Win7, 8, 10? macOS? Linux distro?): Windows 10 32 bit

  • Brave Version (revision SHA): 0.13.2 RC3

  • Steps to reproduce:

    1. Open some pages to enable URL autocompleted on the URL bar
    2. Make the URL autocompleted
    3. Hit the down arrow key on your keyboard - Note: the error does not happen when I hit any other keys than the down arrow key.
  • Actual result: the error message appears on the console

  • Expected result: the error should not happen

  • Screenshot if needed:
    clipboard01

  • Any related issues: I suspect this is related in a way with Autofill: can't select popup item using arrow keys #1302

Test plan

  1. Open about:preferences
  2. On Windows, show the menu bar by disabling "Hide the menu bar by default"
  3. Open https://trac.torproject.org/projects/tor/login
  4. Autofill for the user name
  5. Select your user name with the down arrow key
@luixxiul luixxiul added the bug label Feb 4, 2017
@luixxiul luixxiul added this to the 0.13.2 milestone Feb 4, 2017
@NejcZdovc
Copy link
Contributor

I can't reproduce this on macOS

@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

This can be reproduced with the input field on a page, inside webview.

  1. Open https://trac.torproject.org/projects/tor/login
  2. Set the focus on the username input form
  3. Hit the arrow down key on your keyboard

trac

@luixxiul luixxiul added the needs-investigation A bug not 100% confirmed/fixed that needs QA to better audit. label Feb 4, 2017
@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

I added the needs investigation label just now as this cannot be repro on a fresh profile

@NejcZdovc
Copy link
Contributor

Will try to investigate, the problem is that code that is triggered is the code that is used for menu bar (alternative menu for Windows)

@NejcZdovc NejcZdovc self-assigned this Feb 4, 2017
@jonathansampson
Copy link
Collaborator

@luixxiul Can you set a breakpoint on that line, and see what the selectedIndex is?

@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

I am not sure if this is the expected one, but here it is:

clipboard01

@alexwykoff
Copy link
Contributor

i could not replicate on my windows 7 ia-32 (rev 1d936db) with a clean profile.

it's obviously happening per above, but might be hyper-isolated to win10 ia-32

@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

@alexwykoff please enable the title menu bar. Enabling it causes the issue for me 100%

@luixxiul luixxiul removed the needs-investigation A bug not 100% confirmed/fixed that needs QA to better audit. label Feb 4, 2017
@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

I think the root cause of the issue is the same as #6867, which was fixed with #7059

@alexwykoff
Copy link
Contributor

Got it!

Go to preferences, toggle 'hide the menu bar by default' to off.
Autofill for the user name on https://trac.torproject.org/projects/tor/login will behave incorrectly and developer console shows the error as described above.

@luixxiul
Copy link
Contributor Author

luixxiul commented Feb 4, 2017

Updated the 1st post to include the extra QA steps.

@alexwykoff
Copy link
Contributor

cc @bsclifton

@srirambv
Copy link
Collaborator

srirambv commented Feb 4, 2017

Reproduced on Win x64 with menu enabled
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants