@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show confirmation dialog when closing a modal if form contents have been changed

Summary: Honestly I did not realize that Differential can do this. Anyway this is related to T15034 ... Originally opened at https://secure.phabricator.com/T12676

Test Plan:
1) Start creating a task via a Workboard in Manifest, type many words, press `ESC`

2) Start creating a task via a Workboard in Manifest, type no words, press `ESC`

Reviewers: O1 Blessed Committers, Ekubischta, speck

Reviewed By: O1 Blessed Committers, Ekubischta, speck

Subscribers: Leon95, 20after4, avivey, Ekubischta, speck, tobiaswiese

Tags: #maniphest

Differential Revision: https://we.phorge.it/D25015

+19
+19
webroot/rsrc/externals/javelin/lib/Workflow.js
··· 403 403 JX.$E('Response to workflow request went unhandled.'); 404 404 } 405 405 } 406 + 407 + var form = JX.DOM.scry(this._root, 'form', 'jx-dialog'); 408 + if (form.length) { 409 + JX.DOM.listen(form[0], 'keydown', null, function(e) { 410 + if (e.getSpecialKey()) { 411 + return; 412 + } 413 + JX.Stratcom.addSigil(form[0], 'dialog-keydown'); 414 + }); 415 + } 406 416 }, 407 417 _push : function() { 408 418 if (!this._pushed) { ··· 533 543 534 544 if (!cancel) { 535 545 // No 'Cancel' button. 546 + return; 547 + } 548 + 549 + var form = JX.DOM.scry(active._root, 'form', 'jx-dialog'); 550 + if ( 551 + form.length && 552 + JX.Stratcom.hasSigil(form[0], 'dialog-keydown') && 553 + !confirm('Form data may have changed. Are you sure you want to close this dialog?') 554 + ) { 536 555 return; 537 556 } 538 557