jenkins-bot has submitted this change and it was merged.
Change subject: MobileFrontend fix back on Special:Nearby
......................................................................
MobileFrontend fix back on Special:Nearby
Fixes back on browser from an article reached via
Special:Nearby/#page/Page_Title
Bug: T117412
Change-Id: I1b9574b24d2a12fe942da7ecbe5d7a62b8508bbf
---
M resources/mobile.nearby/Nearby.js
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/mobile.nearby/Nearby.js
b/resources/mobile.nearby/Nearby.js
index 11f3156..2699f6e 100644
--- a/resources/mobile.nearby/Nearby.js
+++ b/resources/mobile.nearby/Nearby.js
@@ -229,7 +229,11 @@
// FIXME: not unique if multiple Nearby objects
on same page
$( this ).attr( 'id', 'nearby-page-list-item-'
+ i );
} ).on( 'click', function () {
- window.location.hash = $( this ).attr( 'id' );
+ // if not on Special:Nearby/#page/page_title or
Special:Nearby/#coord/
+ // then set hash to clicked element
+ if ( !hash.match( /^(#\/page|#\/coord)/i ) ) {
+ window.location.hash = $( this ).attr(
'id' );
+ }
} );
// Restore the offset
--
To view, visit https://gerrit.wikimedia.org/r/258476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1b9574b24d2a12fe942da7ecbe5d7a62b8508bbf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Sumit <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Sumit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits