Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abcfe57add |
@@ -17,11 +17,14 @@ pushDialogStack = function({template, data, element, returnElement, callback}){
|
|||||||
updateHistory();
|
updateHistory();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var currentResult;
|
||||||
|
|
||||||
popDialogStack = function(result){
|
popDialogStack = function(result){
|
||||||
if (history && history.state && history.state.openDialogs){
|
if (history && history.state && history.state.openDialogs){
|
||||||
|
currentResult = result;
|
||||||
history.back();
|
history.back();
|
||||||
} else {
|
} else {
|
||||||
popDialogStackAction();
|
popDialogStackAction(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +32,8 @@ window.onpopstate = function(event){
|
|||||||
let state = event.state;
|
let state = event.state;
|
||||||
let numDialogs = dialogs._array.length;
|
let numDialogs = dialogs._array.length;
|
||||||
if (_.isFinite(state.openDialogs) && numDialogs > state.openDialogs){
|
if (_.isFinite(state.openDialogs) && numDialogs > state.openDialogs){
|
||||||
popDialogStackAction();
|
popDialogStackAction(currentResult);
|
||||||
|
currentResult = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user