Answer the question
In order to leave comments, you need to log in
Is .removeClass('ui-btn-active') not working correctly in JQuery Mobile on Android?
There is an application with JQuery Mobile and Phonegap, it has a line:
$(".ui-btn-active").removeClass('ui-btn-active');
on the event "panelbeforeclose"
"deactivates" the button in the footer (the button opens the JQuery Mobile panel) after the panel is closed (because by default, after closing the panel, the button remains "pressed", i.e. .e. has the class ui-btn-active
). Everything works in the browser, but on the android emulator and the phone, the following happens: the button is always deactivated, even when the panel is opened, although the "deactivation" should only work on the event "panelbeforeclose"
.
I was already thinking about submitting the bug in JQuery Mobile, but when I entered the code for the panel, footer and button into JSBin, as requested on github , it turned out that everything was working fine. It turns out that the problem is caused by other code in the application.
If this affects something, then on("vclick") of the button is in pagebeforeshow, and on("panelbeforeclose") in pageinit.
What could cause such a problem? Thanks
Answer the question
In order to leave comments, you need to log in
Apparently, the fact is that the button in the footer is not activated at all when the panel is opened (which I did not notice), but only when it is closed. So it turns out that I just removed its "activation" even when closing. Too bad the question can't be deleted.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question