mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-29 16:14:25 +00:00
fix routeOnClick() to open already active routes in new tab
This commit is contained in:
parent
b7a8240bbc
commit
c7f3c9780b
@ -937,8 +937,8 @@ function routeOnClick(event) {
|
|||||||
routeNewTab(event);
|
routeNewTab(event);
|
||||||
else {
|
else {
|
||||||
var modal = $(event.target).closest('.modal-wrapper:not(.closed)');
|
var modal = $(event.target).closest('.modal-wrapper:not(.closed)');
|
||||||
if (modal.length) { // killer feature: we minimize current modal before .route opening
|
if (modal.length && window.location.hash !== event.data.route) {
|
||||||
minimizeModal(modal, true);
|
minimizeModal(modal, true); // yep, we minimize current modal before .route opening
|
||||||
window.location.hash = event.data.route;
|
window.location.hash = event.data.route;
|
||||||
} else
|
} else
|
||||||
routeNewTab(event);
|
routeNewTab(event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user