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

[AutoComplete] focus gets lost to Popover in Firefox #2968

Closed
jeffberry opened this issue Jan 17, 2016 · 7 comments
Closed

[AutoComplete] focus gets lost to Popover in Firefox #2968

jeffberry opened this issue Jan 17, 2016 · 7 comments
Labels
bug 🐛 Something doesn't work

Comments

@jeffberry
Copy link

So I've been using AutoComplete successfully for the last few weeks in Chrome. Unfortunately our client hates Google and we need to make our app work in Firefox.

It appears that the current AutoComplete loses it's focus in Firefox as soon as the popover opens with results. I tested this on the official Material-UI documentation site as well. I am using the latest version of Firefox (43.0.4) if that helps.

I've been messing with it for hours trying to figure the issue out myself, but can't seem to make any progress.

@hmeerlo
Copy link

hmeerlo commented Jan 18, 2016

I am having a similar problem in Chrome. For me it occurs when I have more than 1 AutoComplete on screen. The popover is closed immediately because of a onClickAway on the render layer of the popover. It results in very weird behaviour.

@hmeerlo
Copy link

hmeerlo commented Jan 18, 2016

Ok, this is what I observed:

  • Click on the textfield to open the popover
  • Focus event results in opening the popover (and it is probably rendered immediately)
  • After the focus event the popover immediately receives a click event which is handled by the onClickAway to dismiss the popover again.

It looks like a timing issue, because when I set a breakpoint after the focus event is received and then lit continu it works fine.

@hmeerlo
Copy link

hmeerlo commented Jan 20, 2016

@alitaheri I don't think this deserves the Cross Browser Support label, it looks like a bug to me.

@alitaheri alitaheri added bug 🐛 Something doesn't work and removed Cross Browser Support labels Jan 20, 2016
@alitaheri
Copy link
Member

Yeah, you're right. Thanks

@pdc
Copy link
Contributor

pdc commented Mar 7, 2016

I think the issues @hmeerlo and @jeffberry are describing are different. I am also seeing a Firefox-specific UI problem.

To reproduce:

Step 1.

Open Chrome at http://www.material-ui.com/#/components/auto-complete
Click on the AutoComplete in the Simple example box.
Type chrysanthemum
Result: List of options is displayed below the text box and the text box displays chrysanthemum.

Step 2.

Open Firefox on http://www.material-ui.com/#/components/auto-complete
Click on the AutoComplete in the Simple example box.
Type chrysanthemum
Actual result: List of options is displayed and text box displays c. Clicking down arrow highlights the second item in the drop list, indicating focus is on the list rather than the text field.
Expected result: Same as Chrome.

Although the page I have referred to has multiple autocomplete widgets, the problem also shows on a page with just the one.

@pdc
Copy link
Contributor

pdc commented Mar 7, 2016

Further search reveals this the problem I describe is covered by #3339 and addressed in PR #3356.

It is also possible that #3356 also fixes the other focus issue.

@newoga newoga changed the title AutoComplete focus gets lost to Popover in Firefox [AutoComplete] focus gets lost to Popover in Firefox Mar 9, 2016
@newoga
Copy link
Contributor

newoga commented Mar 9, 2016

Thanks for updating this @pdc. Everyone can test the changes in those PRs in our latest alpha since #3356 was included as part of that release. Feel free to reopen this if you are still having this problem.

http://www.material-ui.com/v0.15.0-alpha.1/#/components/auto-complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

5 participants