Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2936022
D25076.1737895714.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25076.1737895714.diff
View Options
diff --git a/webroot/rsrc/externals/javelin/lib/Workflow.js b/webroot/rsrc/externals/javelin/lib/Workflow.js
--- a/webroot/rsrc/externals/javelin/lib/Workflow.js
+++ b/webroot/rsrc/externals/javelin/lib/Workflow.js
@@ -404,14 +404,18 @@
}
}
- var form = JX.DOM.scry(this._root, 'form', 'jx-dialog');
- if (form.length) {
- JX.DOM.listen(form[0], 'keydown', null, function(e) {
- if (e.getSpecialKey()) {
- return;
- }
- JX.Stratcom.addSigil(form[0], 'dialog-keydown');
- });
+ // Only when the response is a Dialog, check if the user
+ // is quitting with pending changes
+ if (this._root) {
+ var form = JX.DOM.scry(this._root, 'form', 'jx-dialog');
+ if (form.length) {
+ JX.DOM.listen(form[0], 'keydown', null, function(e) {
+ if (e.getSpecialKey()) {
+ return;
+ }
+ JX.Stratcom.addSigil(form[0], 'dialog-keydown');
+ });
+ }
}
},
_push : function() {
@@ -546,13 +550,20 @@
return;
}
- var form = JX.DOM.scry(active._root, 'form', 'jx-dialog');
- if (
- form.length &&
- JX.Stratcom.hasSigil(form[0], 'dialog-keydown') &&
- !confirm('Form data may have changed. Are you sure you want to close this dialog?')
- ) {
- return;
+ // Only when the response is a Dialog, check if the user
+ // is quitting with pending changes
+ if (active._root) {
+ var form = JX.DOM.scry(active._root, 'form', 'jx-dialog');
+ var confirmMsg =
+ 'Form data may have changed. ' +
+ 'Are you sure you want to close this dialog?';
+ if (
+ form.length &&
+ JX.Stratcom.hasSigil(form[0], 'dialog-keydown') &&
+ !window.confirm(confirmMsg)
+ ) {
+ return;
+ }
}
JX.Workflow._pop();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 26, 12:48 (4 d, 5 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1133379
Default Alt Text
D25076.1737895714.diff (1 KB)
Attached To
Mode
D25076: Fix regression in new confirmation Dialog
Attached
Detach File
Event Timeline
Log In to Comment