Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

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

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

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

toddparker opened this issue Jan 25, 2011 · 8 comments

Comments

@toddparker
Copy link
Contributor

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
Copy link

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 pushed a commit to fcheslack/jquery-mobile that referenced this issue Jul 28, 2011
…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 jquery-archive#874
@phuongnd08
Copy link

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
Copy link
Contributor Author

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

@phuongnd08
Copy link

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
Copy link

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
Copy link
Contributor Author

@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
Copy link

@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
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants