Split button in list not clickable in Android 1.6, 2.1 #874

Closed
toddparker opened this Issue Jan 25, 2011 · 8 comments

3 participants

@toddparker

If you open the split button demo page:
http://jquerymobile.com/test/docs/lists/lists-split.html

In Android 1.6 and 2..1, clicking the right hand gera icon end up clicking the left part of the row instead so the split button it's functional. Works as expected in Android 2.2 an 2.3. This can be confirmed on emulators if devices aren't available.

@scottjehl

In android 2.1 and 1.6, the split button anchor needed to be a sibling of the overall row button div in the LI. It seems this may be due to the event handlers bound to the div button, but I'm not entirely sure that's it. Either way, this workaround is straightforward and does not introduce issues in other browsers, so aside from the additional overhead involved in re-appending the links to the LIs, this fix is good to go. Closed by 16c743a

@fcheslack fcheslack pushed a commit to fcheslack/jquery-mobile that referenced this issue Jul 28, 2011
scottjehl In android 2.1 and 1.6, the split button anchor needed to be a siblin…
…g of the overall row button div in the LI. It seems this may be due to the event handlers bound to the div button, but I'm not entirely sure that's it. Either way, this workaround is straightforward and does not introduce issues in other browsers, so aside from the additional overhead involved in re-appending the links to the LIs, this fix is good to go. Fixes #874
16c743a
@timmywil timmywil pushed a commit that referenced this issue Oct 24, 2011
scottjehl In android 2.1 and 1.6, the split button anchor needed to be a siblin…
…g of the overall row button div in the LI. It seems this may be due to the event handlers bound to the div button, but I'm not entirely sure that's it. Either way, this workaround is straightforward and does not introduce issues in other browsers, so aside from the additional overhead involved in re-appending the links to the LIs, this fix is good to go. Fixes #874
c0deb89
@phuongnd08

I don't understand your fix. I tried with this html structure on Android 2.3 and the split (Ready button) is not clickable:
Please see this gist, cannot properly format haml in my comment:
https://gist.github.com/2005400

@toddparker

@phuongnd08 - Can you post a working test page using the latest code? Template: http://jsbin.com/evovez/edit

@phuongnd08

I tried and it works fine on android 2.3: http://jsbin.com/evovez/9/edit#source
But as soon as I include jquery_ujs, which is a rails helper to trigger ajax put request when anchor clicked (a[data-remove=true]), it is not working on android 2.3 anymore (still work on Chrome). I don't know how a way that I can see if any javascript error is thrown on the android webkit.

@phuongnd08

The button seem to be clickable (it look like it is pressed), but the ajax call associated is not called. I use window.onerror to trap and console.warn the error, then use logcat to view the log, but haven't seen any error being thrown

@toddparker

@phuongnd08 - Adding a script that attaches behavior to the links, especially if it deals with AJAX will probably interfere with our default AJAX navigation system. Your jsbin doesn't include that additional file, but I'd assume it's just a conflict with that.

@phuongnd08

@toddparker: Okay, I've add that js file in case you want to have a look: http://jsbin.com/evovez/10/edit
That included jquery_ujs is causing the button not to clickable on android (and again: it works perfectly on Chrome)

@phuongnd08

Sorry for any confusion. It turn out to be a WEBRick (Rails default Web server) issues. The ajax request originated by clicking the button is sent, but WEBRick is unable to process it. I tried with Thin and it works like a charm.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment