Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown won't open in IE if openOnFocus is false #1315

Closed
cattermo opened this issue Feb 13, 2017 · 10 comments
Closed

Dropdown won't open in IE if openOnFocus is false #1315

cattermo opened this issue Feb 13, 2017 · 10 comments
Labels

Comments

@cattermo
Copy link

Steps

  1. I have a dropdown with search and selection enabled and openOnFocus={false}
  2. I open the website in Internet explorer 11
  3. I click the dropdown with the mouse

Expected Result

The dropdown should open when clicked.

Actual Result

I get a javascript error from this row in the code:
if (options[nextIndex].disabled) return _this.moveSelectionBy(offset, nextIndex);
saying that options[nextIndex] is undefined
The dropdown don't open

Version

0.64.5

@levithomason
Copy link
Member

Thanks for the report. Can you please paste the full error or a screenshot of it? Also, a working codepen will help us debug more thoroughly.

@layershifter I'm guessing this is due to different event handling on windows, could you confirm?

@layershifter
Copy link
Member

I'll check it on my PC tomorrow.

@cattermo
Copy link
Author

Sadly my Internet Explorer is locked to Swedish (work computer) so the error messages was not so usable. I will try to reproduce the bug on codepen tomorrow.

@cattermo
Copy link
Author

So here is a pen http://codepen.io/cattermo/pen/zNeqpY
The dropdown does open some times but it's very unreliable and seems to depend a bit on where I click (on the text, on the arrow, on the whitespace etc).
I'm on Windows 7 with Internet Explorer 11.0.9600.18499

I can't reproduce the javascript error, I will have to look into why that occurs in our app but not in the pen.

@levithomason
Copy link
Member

Thanks, getting closer here. Could you list specifically what happens when you click each of those parts? Example:

  • clicking text, opens dropdown
  • clicking dropdown icon, does not open
  • clicking whitespace inside the search field, throws error

Something like this will help us track down which event handlers need looked into.

@cattermo
Copy link
Author

My results are:

  • clicking once on placeholder text, does not open
  • double clicking on placeholder text, opens dropdown (!)
  • clicking once on arrow, does not open
  • double clicking on arrow, opens dropdown (!)
  • clicking on whitespace, opens dropdown
  • double clicking on whitespace, opens and closes dropdown (as expected)

In summary everything works fine when clicking on the whitespace (between placeholder text and arrow) but clicking the arrow or the placeholder text requires a double click to make the dropdown open.

@cattermo
Copy link
Author

We still have this problem in IE11 if anyone has the time to take a look...

@layershifter
Copy link
Member

@cattermo I lost this issue from my sight. I've checked Dropdown's docs, but can't reproduce issue. Can you make a codepen with mininal code that shows error in IE?

@cattermo
Copy link
Author

cattermo commented May 9, 2017

The bug can still be reproduced in the pen here http://codepen.io/cattermo/pen/zNeqpY (updated with semantic-ui-react 0.68.2) @layershifter

I still have the same results as my comment from feb 14 says.

@layershifter
Copy link
Member

layershifter commented May 10, 2017

@cattermo Oh, I missed that codepen was already there. It's a known bug with onBlur and IE (facebook/react#3751).

PR is here (#1667), will be awesome to get a feedback.

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

No branches or pull requests

3 participants