1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

popup cancelling - use state reference

in the google group there's a discussion: https://groups.google.com/forum/#!topic/tiddlywiki/_mDDZ1jpMgU

buttons allow setting a state-reference for popups but the popup mechanism doesn't respect that
This commit is contained in:
Simon Huber 2019-07-11 07:35:06 +02:00 committed by GitHub
parent 86286c6fce
commit ecbbe87a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,11 @@ Popup.prototype.cancel = function(level) {
for(var t=level; t<numPopups; t++) { for(var t=level; t<numPopups; t++) {
var popup = this.popups.pop(); var popup = this.popups.pop();
if(popup.title) { if(popup.title) {
popup.wiki.deleteTiddler(popup.title); if(popup.noStateReference) {
popup.wiki.deleteTiddler(popup.title);
} else {
popup.wiki.deleteTiddler($tw.utils.parseTextReference(popup.title).title);
}
} }
} }
if(this.popups.length === 0) { if(this.popups.length === 0) {