@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.

Prevent double-submit with control + enter

Summary: Fixes T2833. Lock forms and prevent double submit on control + enter.

Test Plan: Mashed control + enter a whole bunch in Maniphest, got one comment instead of several.

Reviewers: btrahan, edward

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2833

Differential Revision: https://secure.phabricator.com/D5473

+47 -40
+39 -39
src/__celerity_resource_map__.php
··· 1161 1161 ), 1162 1162 'javelin-behavior-aphront-form-disable-on-submit' => 1163 1163 array( 1164 - 'uri' => '/res/b5052cd0/rsrc/js/application/core/behavior-form.js', 1164 + 'uri' => '/res/f5a60aec/rsrc/js/application/core/behavior-form.js', 1165 1165 'type' => 'js', 1166 1166 'requires' => 1167 1167 array( ··· 3455 3455 ), 3456 3456 'phrequent-css' => 3457 3457 array( 3458 - 'uri' => '/res/8fc8f63c/rsrc/css/application/phrequent/phrequent.css', 3458 + 'uri' => '/res/9d6f3eb7/rsrc/css/application/phrequent/phrequent.css', 3459 3459 'type' => 'css', 3460 3460 'requires' => 3461 3461 array( ··· 3807 3807 'uri' => '/res/pkg/4fc2a8f9/core.pkg.css', 3808 3808 'type' => 'css', 3809 3809 ), 3810 - '95ceba95' => 3810 + 'def4c982' => 3811 3811 array( 3812 3812 'name' => 'core.pkg.js', 3813 3813 'symbols' => ··· 3848 3848 33 => 'javelin-behavior-global-drag-and-drop', 3849 3849 34 => 'javelin-behavior-phabricator-reveal-content', 3850 3850 ), 3851 - 'uri' => '/res/pkg/95ceba95/core.pkg.js', 3851 + 'uri' => '/res/pkg/def4c982/core.pkg.js', 3852 3852 'type' => 'js', 3853 3853 ), 3854 3854 'dca4a03d' => ··· 4020 4020 'diffusion-icons-css' => 'c8ce2d88', 4021 4021 'global-drag-and-drop-css' => '4fc2a8f9', 4022 4022 'inline-comment-summary-css' => '8aaacd1b', 4023 - 'javelin-aphlict' => '95ceba95', 4023 + 'javelin-aphlict' => 'def4c982', 4024 4024 'javelin-behavior' => 'fe22443b', 4025 - 'javelin-behavior-aphlict-dropdown' => '95ceba95', 4026 - 'javelin-behavior-aphlict-listen' => '95ceba95', 4027 - 'javelin-behavior-aphront-basic-tokenizer' => '95ceba95', 4025 + 'javelin-behavior-aphlict-dropdown' => 'def4c982', 4026 + 'javelin-behavior-aphlict-listen' => 'def4c982', 4027 + 'javelin-behavior-aphront-basic-tokenizer' => 'def4c982', 4028 4028 'javelin-behavior-aphront-drag-and-drop' => '322728f3', 4029 4029 'javelin-behavior-aphront-drag-and-drop-textarea' => '322728f3', 4030 - 'javelin-behavior-aphront-form-disable-on-submit' => '95ceba95', 4030 + 'javelin-behavior-aphront-form-disable-on-submit' => 'def4c982', 4031 4031 'javelin-behavior-audit-preview' => 'f96657b8', 4032 4032 'javelin-behavior-dark-console' => 'dca4a03d', 4033 - 'javelin-behavior-device' => '95ceba95', 4033 + 'javelin-behavior-device' => 'def4c982', 4034 4034 'javelin-behavior-differential-accept-with-errors' => '322728f3', 4035 4035 'javelin-behavior-differential-add-reviewers-and-ccs' => '322728f3', 4036 4036 'javelin-behavior-differential-comment-jump' => '322728f3', ··· 4046 4046 'javelin-behavior-diffusion-commit-graph' => 'f96657b8', 4047 4047 'javelin-behavior-diffusion-pull-lastmodified' => 'f96657b8', 4048 4048 'javelin-behavior-error-log' => 'dca4a03d', 4049 - 'javelin-behavior-global-drag-and-drop' => '95ceba95', 4050 - 'javelin-behavior-history-install' => '95ceba95', 4051 - 'javelin-behavior-konami' => '95ceba95', 4052 - 'javelin-behavior-lightbox-attachments' => '95ceba95', 4049 + 'javelin-behavior-global-drag-and-drop' => 'def4c982', 4050 + 'javelin-behavior-history-install' => 'def4c982', 4051 + 'javelin-behavior-konami' => 'def4c982', 4052 + 'javelin-behavior-lightbox-attachments' => 'def4c982', 4053 4053 'javelin-behavior-load-blame' => '322728f3', 4054 4054 'javelin-behavior-maniphest-batch-selector' => 'f85eb6d8', 4055 4055 'javelin-behavior-maniphest-subpriority-editor' => 'f85eb6d8', 4056 4056 'javelin-behavior-maniphest-transaction-controls' => 'f85eb6d8', 4057 4057 'javelin-behavior-maniphest-transaction-expand' => 'f85eb6d8', 4058 4058 'javelin-behavior-maniphest-transaction-preview' => 'f85eb6d8', 4059 - 'javelin-behavior-phabricator-active-nav' => '95ceba95', 4060 - 'javelin-behavior-phabricator-autofocus' => '95ceba95', 4061 - 'javelin-behavior-phabricator-gesture' => '95ceba95', 4062 - 'javelin-behavior-phabricator-keyboard-shortcuts' => '95ceba95', 4063 - 'javelin-behavior-phabricator-nav' => '95ceba95', 4059 + 'javelin-behavior-phabricator-active-nav' => 'def4c982', 4060 + 'javelin-behavior-phabricator-autofocus' => 'def4c982', 4061 + 'javelin-behavior-phabricator-gesture' => 'def4c982', 4062 + 'javelin-behavior-phabricator-keyboard-shortcuts' => 'def4c982', 4063 + 'javelin-behavior-phabricator-nav' => 'def4c982', 4064 4064 'javelin-behavior-phabricator-object-selector' => '322728f3', 4065 - 'javelin-behavior-phabricator-oncopy' => '95ceba95', 4066 - 'javelin-behavior-phabricator-remarkup-assist' => '95ceba95', 4067 - 'javelin-behavior-phabricator-reveal-content' => '95ceba95', 4068 - 'javelin-behavior-phabricator-search-typeahead' => '95ceba95', 4069 - 'javelin-behavior-phabricator-tooltips' => '95ceba95', 4070 - 'javelin-behavior-phabricator-watch-anchor' => '95ceba95', 4071 - 'javelin-behavior-refresh-csrf' => '95ceba95', 4065 + 'javelin-behavior-phabricator-oncopy' => 'def4c982', 4066 + 'javelin-behavior-phabricator-remarkup-assist' => 'def4c982', 4067 + 'javelin-behavior-phabricator-reveal-content' => 'def4c982', 4068 + 'javelin-behavior-phabricator-search-typeahead' => 'def4c982', 4069 + 'javelin-behavior-phabricator-tooltips' => 'def4c982', 4070 + 'javelin-behavior-phabricator-watch-anchor' => 'def4c982', 4071 + 'javelin-behavior-refresh-csrf' => 'def4c982', 4072 4072 'javelin-behavior-repository-crossreference' => '322728f3', 4073 - 'javelin-behavior-toggle-class' => '95ceba95', 4074 - 'javelin-behavior-workflow' => '95ceba95', 4073 + 'javelin-behavior-toggle-class' => 'def4c982', 4074 + 'javelin-behavior-workflow' => 'def4c982', 4075 4075 'javelin-dom' => 'fe22443b', 4076 4076 'javelin-event' => 'fe22443b', 4077 4077 'javelin-install' => 'fe22443b', ··· 4093 4093 'lightbox-attachment-css' => '4fc2a8f9', 4094 4094 'maniphest-task-summary-css' => '6b1fccc6', 4095 4095 'maniphest-transaction-detail-css' => '6b1fccc6', 4096 - 'phabricator-busy' => '95ceba95', 4096 + 'phabricator-busy' => 'def4c982', 4097 4097 'phabricator-content-source-view-css' => '8aaacd1b', 4098 4098 'phabricator-core-buttons-css' => '4fc2a8f9', 4099 4099 'phabricator-core-css' => '4fc2a8f9', 4100 4100 'phabricator-crumbs-view-css' => '4fc2a8f9', 4101 4101 'phabricator-directory-css' => '4fc2a8f9', 4102 4102 'phabricator-drag-and-drop-file-upload' => '322728f3', 4103 - 'phabricator-dropdown-menu' => '95ceba95', 4104 - 'phabricator-file-upload' => '95ceba95', 4103 + 'phabricator-dropdown-menu' => 'def4c982', 4104 + 'phabricator-file-upload' => 'def4c982', 4105 4105 'phabricator-filetree-view-css' => '4fc2a8f9', 4106 4106 'phabricator-flag-css' => '4fc2a8f9', 4107 4107 'phabricator-form-view-css' => '4fc2a8f9', 4108 4108 'phabricator-header-view-css' => '4fc2a8f9', 4109 4109 'phabricator-jump-nav' => '4fc2a8f9', 4110 - 'phabricator-keyboard-shortcut' => '95ceba95', 4111 - 'phabricator-keyboard-shortcut-manager' => '95ceba95', 4110 + 'phabricator-keyboard-shortcut' => 'def4c982', 4111 + 'phabricator-keyboard-shortcut-manager' => 'def4c982', 4112 4112 'phabricator-main-menu-view' => '4fc2a8f9', 4113 - 'phabricator-menu-item' => '95ceba95', 4113 + 'phabricator-menu-item' => 'def4c982', 4114 4114 'phabricator-nav-view-css' => '4fc2a8f9', 4115 - 'phabricator-notification' => '95ceba95', 4115 + 'phabricator-notification' => 'def4c982', 4116 4116 'phabricator-notification-css' => '4fc2a8f9', 4117 4117 'phabricator-notification-menu-css' => '4fc2a8f9', 4118 4118 'phabricator-object-item-list-view-css' => '4fc2a8f9', 4119 4119 'phabricator-object-selector-css' => '8aaacd1b', 4120 - 'phabricator-paste-file-upload' => '95ceba95', 4121 - 'phabricator-prefab' => '95ceba95', 4120 + 'phabricator-paste-file-upload' => 'def4c982', 4121 + 'phabricator-prefab' => 'def4c982', 4122 4122 'phabricator-project-tag-css' => '6b1fccc6', 4123 4123 'phabricator-remarkup-css' => '4fc2a8f9', 4124 4124 'phabricator-shaped-request' => '322728f3', 4125 4125 'phabricator-side-menu-view-css' => '4fc2a8f9', 4126 4126 'phabricator-standard-page-view' => '4fc2a8f9', 4127 - 'phabricator-textareautils' => '95ceba95', 4128 - 'phabricator-tooltip' => '95ceba95', 4127 + 'phabricator-textareautils' => 'def4c982', 4128 + 'phabricator-tooltip' => 'def4c982', 4129 4129 'phabricator-transaction-view-css' => '4fc2a8f9', 4130 4130 'phabricator-zindex-css' => '4fc2a8f9', 4131 4131 'sprite-apps-large-css' => '4fc2a8f9',
+1 -1
src/__phutil_library_map__.php
··· 3249 3249 'PhrequentController' => 'PhabricatorController', 3250 3250 'PhrequentDAO' => 'PhabricatorLiskDAO', 3251 3251 'PhrequentListController' => 'PhrequentController', 3252 - 'PhrequentTrackController' => 'PhabricatorApplicationsController', 3252 + 'PhrequentTrackController' => 'PhrequentController', 3253 3253 'PhrequentUIEventListener' => 'PhutilEventListener', 3254 3254 'PhrequentUserTime' => 'PhrequentDAO', 3255 3255 'PhrequentUserTimeQuery' => 'PhabricatorOffsetPagedQuery',
+7
webroot/rsrc/js/application/core/behavior-form.js
··· 31 31 return; 32 32 } 33 33 34 + // Don't double-submit forms. 35 + if (form._disabled) { 36 + return; 37 + } 38 + 39 + will_submit(form); 40 + 34 41 // If nothing handled the synthetic submit, submit normally. 35 42 form.submit(); 36 43 });