-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Safari iOS] Select inputs closes on fast tap since issue #226 fix #268
Comments
Drawnback: VoiceOver is broken on iOS
@laurentgoudet I tried your forked version but I still see the same behaviour on selects. |
I'm experiencing this issue as well. Would love to see a fix. |
+1 having the same issue. |
thanks @laurentgoudet, your revert fix works for me |
Have the same: |
This works for me:
Tested on Safari and Chrome @ iOS7 |
@Deliaz That fixes the issue in iOS, but prevents selects from being used in Chrome on Android for example. (tested @ Nexus4) |
@laurentgoudet Were you able to find a fix for this? Or did you stick with reverting the mentioned fix? |
@mgustafsson1 like @laurentgoudet I rolled back #226 changes on my project and it seems to have resolved the issue for me. |
Drawnback: VoiceOver is broken on iOS
Checks if the focus & click events cause the screen to move, and if so (non-VoiceOver case), doesn't a preventDefault; if not (VoiceOver case), doesn't do the preventDefault.
Just submitted a pull request to fix this issue. |
@asselin Nice, thanks! |
@Deliaz That may be a fix for those who use jQuery in their project. I am no so fortunate. |
@angi- |
@angi- Ditto for my fix-- no jquery required |
@asselin Yes, it does, under certain adaptations to an angular.js app. needsclick does not catch it, I had not time to see why, but the fix should be right there. |
As OP said you can exclude selects from fastclick and then it's fine. I didn't manage to do that with "needsclick" class. I had to add this to the FastClick.prototype.onTouchStart method in fastclick.js
|
@oldboyxx thank you, this resolved my issue. I expanded upon it to include native datepickers in mobile scenarios. var nodeName = targetElement.nodeName.toLowerCase();
var typeAttribute = targetElement.getAttribute('type');
if (nodeName === "select" || (typeAttribute === 'date' && nodeName === "input") || (typeAttribute === 'datetime' && nodeName === "input")) {
return false;
} |
+1 having the same issue. Fixed nicely by solution from @oldboyxx - thank you very much. |
You can use versolearning@9ac88ef but return value should be false, as @optikalefx mentioned in that request |
@contactmatts @oldboyxx Did you put either of your fixes up in a PR? |
@davidnormo I did not. |
+1 same issue. Made doubly worse it seems when using Angular or dynamicly added selects: the select was totally unselectable unless the user holds down on it for a second or so. |
@oldboyxx fix worked for me: Any reason this isn't taken in to the code as a patch (doubt anyone would care about a 300ms delay on selects on iOS)? |
+1 to merging one of the fixes for this issue. Personally I went for the fix from @oldboyxx |
This will be fixed in some version? I'm using this library but is really awful patch every update or new instalation. |
As @laurentgoudet mentioned: Or simply use my attached modified version =) . The fix of @oldboyxx didn't work for me as it disabled fastclick. |
Problem still occurs, @oldboyxx 's fix worked for me, thanks! |
This isn't a fastclick issue. It happens in all browsers when RTL and the input is out of the viewport: See this: http://codepen.io/davidpelayo/full/jMjggy/ Tested on latest Firefox, latest Chrome stable and Safari on iOS 10. |
+1 for fix by @oldboyxx |
so this repo is broken and no plans to fix it i take it thne? this is still a problem years later |
why would you use something that breaks any input on the page.. .stupid |
…tlabs#226), fixes iOS select-input auto-closed bug ftlabs#446 (comment)
…tlabs#226), fixes iOS select-input auto-closed bug ftlabs#446 (comment)
The fix for the issue #226 is breaking the select inputs on iOS7 (tested on both iPhone 5 & 5s) for "quick" taps (faster than the 100ms threshold) when the position of the select element on the screen is moved up because the dropdown pops up at the bottom of the screen. If the touchend is not preventDefault(), the element under the initial position of the element (if any) will get the focus, closing the select dropdown.
See video here: http://youtu.be/0J_RNTMzHyQ
Test file: http://pastebin.com/hqs3sDB4
If there are no focusable element under to initial on-screen position of the select input it will work fine, as well as if the select input in near the top of the screen and does not move when the dropdown pops up.
The only fixes I found are:
The text was updated successfully, but these errors were encountered: