-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Problem searching list with Hebrew/Arabic filter #2834
Comments
So is this a bug with Android? If you remove jQM from the code, can you get the browser to register a keyup/down event? If not, then I'm not sure what we can do unless there is a different event to try. |
Yeah, it is a bug with Android, or at least with jQuery not catching the keydown/up/press events. However, I did find that the "input" event is triggered, so perhaps that could be used as a fallback for the search. I guess a complete fix will only come with a new Android browser (way belated already), but there might be a workaround. I didn't manage to find it myself, but I am not the JS Ninja that the good people of JQM generally are, and I thought this is something that many developers working in non-english speaking markets might appreciate. |
It's a bug of Android, not jQuery (even not default browsers don't fire onkeyup events for russian, korean, hebrew, etc.) .jqmData( "lastval", "" )
.bind( "keyup change input", function() { instead of .jqmData( "lastval", "" )
.bind( "keyup change", function(){ and now element works as expected |
@rmanempire - Thanks! Looks pretty safe to me to add |
Closing as fixed by commit a743616. @odedbd - Can you please confirm the issue has been fixed. Thanks! Update: you can test latest on this page http://jquerymobile.com/test/docs/lists/lists-search.html |
Hello all,
I have an issue with using the search/filter feature of a list on my Galaxy S, no fiddle/bin necessary, as the problem may be reproduced with the official docs page - http://jquerymobile.com/demos/1.0rc2/docs/lists/lists-search.html
Just try typing in Hebrew or Arabic (And most likely other languages which are not English, I only tested these), and the filtering will not take place after each key press, but rather only after you type some symbol such as a period, a comma or a spacebar. I assume that the distinction here might be between symbols which are or are not part of the basic ASCII keys.
I debugged this a little, and it seems that typing simply doesn't trigger the keydown/up events for these languages. I don't know if the problem lies in the triggering of the events, or in the binding, but the end result is as I described. The problem is not specific to JQM, and was present in all previous versions I tested (alpha3 onward), but it critically impacts this feature of the framework, so I thought it appropriate to submit the issue here.
I can think of ways to bypass this using a watchdog mechanism (with timeout), but a cleaner solution would be better, if one can be had.
Thanks,
o
The text was updated successfully, but these errors were encountered: