Material-ui: [AutoComplete] onNewRequest doesn't fire within iOS devices

Created on 17 May 2016  路  6Comments  路  Source: mui-org/material-ui

Problem description

Within the AutoComplete component, the onNewRequest function doesn't execute all the time on iOS devices. It only executes after a long tap/hold of the menu item.

Made a quick video to demonstrate what is going on:
https://youtu.be/XSTk6TeIa24

Steps to reproduce

Implement AutoComplete component with onNewRequest function, and listen for changes on that function. It only executes after a long tap/hold, when it should be executed on any tap. Test on iOS simulator (Cordova app), which returns the same result as a real physical device.

The issue doesn't occur through mobile Safari, just an app built with Cordova.

Versions

  • Material-UI: 0.15.0
  • React: 15.0.2
  • Browser: iOS Simulator (and physical iPhone app)
bug 馃悰 Autocomplete

Most helpful comment

Still encountering this issue. Anybody else? Using v0.15.4.

All 6 comments

Ok... if I comment out this.close() on this line:
https://github.com/callemall/material-ui/blob/master/src/AutoComplete/AutoComplete.js#L328

The dropdown is properly selected on tap. This appears to be what's causing the issue. Unfortunately, if I do this, of course the PopOver is never closed, so I can't hide the menu options.

It appears that handleBlur is executed before handleItemTouchTap -- this could perhaps be what's causing this issue. It's blurring the menu item before it executes the item tap event, so when the item tap event is executed, the child prop of handleItemTouchTap is empty, so it isn't updated.

Created PR for this. Wrapping close() with a setTimeout fixes this issue.

Still encountering this issue. Anybody else? Using v0.15.4.

Yes, we need this fix as well. Any updates?

Has anyone made a workaround for this issue?

@janowsiany the PR I submitted fixes this. I'm not sure why 馃槅

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pola88 picture pola88  路  3Comments

revskill10 picture revskill10  路  3Comments

FranBran picture FranBran  路  3Comments

TimoRuetten picture TimoRuetten  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments