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

activeBtnClass never be removed when Ajax link handling is disabled #2017

Closed
@arcatdmz

Description

@arcatdmz

When $.mobile.ajaxEnabled === false, $.mobile.activeBtnClass won't be removed from the clicked link after page transition is completed. Related code seems to be jquery.mobile.navigation.js.

As far as I know, $.mobile.activeBtnClass is added to the link in the vclick event handler and is removed after the page transition in the removeActiveLinkClass that requires $activeClickedLink to be set properly.
The $activeClickedLink is set in the click event handler at L1093, which is unreachable when $.mobile.ajaxEnabled === false since it's after if statement at L1041.

To my thinking, fundamental solution is to move the line to set $activeClickedLink just before the if statement.

Current adhoc solution is writing code like:

$(document).bind("changepage", function(){
    $("."+$.mobile.activeBtnClass).removeClass($.mobile.activeBtnClass);
});

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions