This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/acceptance
Andrei Prigorshnev cf1e8b2764
FEATURE: Accept the flag modal on CTRL + ENTER and CMD + ENTER (#13497)
We want to submit the flag modal on pressing CTRL + ENTER and CMD + ENTER.

Here's how our modals work:

Every modal can be dismissed by pressing ESC. This behaviour can be disabled for a specific modal if we need to.
Every modal can be submitted by pressing ENTER if the cursor wasn't on a text area or a form at the moment of pressing.
Now, the flag modal is actually a one big form and pressing ENTER doesn't submit it. I've added submitting by CTRL+ENTER but at first it was interfering with the basic modal submitting by ENTER. It's a pretty tricky thing to fix because we use the keyup event for submitting by ENTER and we need to use the keydown event for submitting with modifiers (because submitting by CMD+ENTER on Macs doesn't work with keyup).

Eventually, I fixed the problem just by adding a possibility to disable default submitting on ENTER (in the same way as we already have the possibility of disabling dismissing on ESC). Then I disabled default submitting for the flag form and implemented submitting by CTRL+ENTER and CMD+ENTER. This way everything is simple and robust. I did it only for the flag modal but it'll be easy and safe to add the same behaviour to another modal.
2021-06-24 14:13:38 +04:00
..
about-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
account-created-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-badges-show-test.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
admin-emails-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-install-theme-modal-test.js FIX: Allow CodeCommit-style theme .git url format (#12739) 2021-04-16 12:46:34 -04:00
admin-search-log-term-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-search-logs-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-site-settings-test.js FIX: force refresh staff action logs when transitioning from site settings (#12096) 2021-02-17 00:18:39 +05:30
admin-site-text-test.js UX: Text customization for different languages. (#11729) 2021-01-18 14:53:45 -03:00
admin-suspend-user-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-user-badges-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-user-emails-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-user-index-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
admin-users-list-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
admin-watched-words-test.js FIX: Add word boundaries to replace and tag watched words (#13405) 2021-06-18 18:54:06 +03:00
auth-complete-test.js UX: login; smaller titles, more consistent spacing, other fixes (#12317) 2021-03-09 17:00:46 -05:00
badges-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
bookmarks-test.js FEATURE: Open the edit bookmark modal when clicking on the topic level bookmark button (#13407) 2021-06-17 19:24:06 +04:00
category-banner-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
category-chooser-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
category-edit-security-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
category-edit-test.js SECURITY: Do not allow unauthorized access to category edit UI (#13252) 2021-06-02 13:18:45 -04:00
category-new-test.js Add category breadcrumbs to edit category page (#13126) 2021-05-25 13:40:11 -05:00
click-track-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
composer-actions-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
composer-attachment-test.js FEATURE: always insert images on new lines and add newline after (#12895) 2021-04-30 12:38:28 +04:00
composer-draft-saving-test.js FEATURE: Don't show the draft checkmark when drafts are saved (#13292) 2021-06-08 13:22:49 +04:00
composer-edit-conflict-test.js FIX: Skip failing tests for composer (#13394) 2021-06-16 11:42:43 +10:00
composer-hyperlink-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
composer-onebox-test.js FIX: Cache missing inline oneboxes (#12953) 2021-05-06 19:08:04 +03:00
composer-tags-test.js FIX: Clientside validate min tags for required tag group (#12758) 2021-04-20 10:39:13 +10:00
composer-test.js FIX: Skip failing tests for composer (#13394) 2021-06-16 11:42:43 +10:00
composer-topic-links-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
composer-uncategorized-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
create-account-external-test.js UX: login; smaller titles, more consistent spacing, other fixes (#12317) 2021-03-09 17:00:46 -05:00
create-account-user-fields-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
create-invite-modal-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
custom-html-set-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
custom-html-template-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
dashboard-test.js FEATURE: Add new features section in admin dashboard (#11731) 2021-01-22 10:09:02 -05:00
do-not-disturb-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
email-notice-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
emoji-picker-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
emoji-test.js DEV: Remove JoyPixels emoji option (#12197) 2021-02-26 07:44:52 -05:00
encoded-category-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
enforce-second-factor-test.js DEV: Sync up more Ember CLI features (#11790) 2021-01-21 15:55:39 -05:00
flag-post-test.js FEATURE: Accept the flag modal on CTRL + ENTER and CMD + ENTER (#13497) 2021-06-24 14:13:38 +04:00
forgot-password-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-index-test.js FEATURE: Split Add Members into Add Users & Invite (#13482) 2021-06-23 17:31:25 +03:00
group-manage-categories-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-manage-email-settings-test.js DEV: Do not re-throw in popupAjaxError (#13462) 2021-06-22 19:29:20 +02:00
group-manage-interaction-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-manage-logs-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-manage-membership-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-manage-profile-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-manage-tags-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-requests-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
group-test.js FEATURE: Split Add Members into Add Users & Invite (#13482) 2021-06-23 17:31:25 +03:00
groups-index-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
groups-new-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
hamburger-menu-test.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
hashtags-test.js FIX: Make category slugs lowercase (#11277) 2021-01-12 17:28:33 +02:00
invite-accept-test.js FIX: Make UI match server behavior for external-auth invites (#13113) 2021-05-26 09:47:44 +01:00
invite-show-user-fields-test.js DEV: Sync up more Ember CLI features (#11790) 2021-01-21 15:55:39 -05:00
jump-to-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
keyboard-shortcuts-test.js DEV: Try fix flaky dismiss keyboard specs (#13452) 2021-06-22 09:21:50 +10:00
login-redirect-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
login-required-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
login-with-email-and-hide-email-address-taken-test.js UX: add link for email login below username, remove button (#12118) 2021-02-24 16:30:08 -05:00
login-with-email-and-no-social-logins-test.js UX: add link for email login below username, remove button (#12118) 2021-02-24 16:30:08 -05:00
login-with-email-disabled-test.js UX: add link for email login below username, remove button (#12118) 2021-02-24 16:30:08 -05:00
login-with-email-test.js UX: add link for email login below username, remove button (#12118) 2021-02-24 16:30:08 -05:00
mobile-discovery-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
mobile-pan-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
mobile-sign-in-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
mobile-users-test.js FEATURE: Add user custom fields to user directory (#13238) 2021-06-07 12:34:01 -05:00
modal-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
new-message-test.js DEV: {{user-selector}} replacement (#11726) 2021-02-01 13:07:11 +03:00
new-topic-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
notifications-filter-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
notifications-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
opengraph-tag-updater-test.js FIX: Safari iOS page title and url regression when sharing (#11699) 2021-01-13 11:10:43 -05:00
page-publishing-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
password-reset-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
personal-message-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
plugin-keyboard-shortcut-test.js FIX: Isolate modal and global key-binds (#12477) 2021-03-29 13:58:03 +02:00
plugin-outlet-connector-class-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
plugin-outlet-decorator-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
plugin-outlet-multi-template-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
plugin-outlet-single-template-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
post-admin-menu-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
preferences-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
raw-plugin-outlet-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
redirect-to-top-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reports-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
review-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
search-full-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
search-mobile-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
search-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
share-topic-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
shared-drafts-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
sign-in-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
static-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
tag-groups-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
tags-intersection-test.js FEATURE: Always show tag dropdown when tagging is enabled (#12209) 2021-03-10 21:13:15 -05:00
tags-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
topic-admin-menu-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-anonymous-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
topic-bulk-actions-test.js DEV: add JS test for topic bulk action modal (#12621) 2021-04-07 06:34:36 +05:30
topic-discovery-test.js FEATURE: Move site updated modal into a less obtrusive prompt (#12577) 2021-04-07 08:56:48 +10:00
topic-edit-timer-test.js FEATURE: make date pickers in the bookmarks UI and topic timer UI consistent with all other pickers (#13365) 2021-06-15 16:54:00 +04:00
topic-footer-buttons-mobile-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-list-tracker-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-move-posts-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-notifications-button-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-quote-button-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
topic-slow-mode-test.js UX: show Update button instead of Enable button when slow mode is already enabled (#13077) 2021-05-25 13:33:39 +04:00
topic-test.js FIX: respect nofollow exclusion setting in topic featured links. (#11858) 2021-06-15 15:27:43 +05:30
unknown-test.js FIX: handle permalinks with query parameters (#12700) 2021-04-14 20:03:25 +02:00
user-anonymous-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
user-bookmarks-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
user-card-test.js DEV: Sync up more Ember CLI features (#11790) 2021-01-21 15:55:39 -05:00
user-drafts-stream-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
user-preferences-interface-test.js Code review comments. 2021-06-21 11:06:58 +08:00
user-preferences-notifications-test.js DEV: Clean up QUnit tests (#13328) 2021-06-08 17:54:12 +02:00
user-test.js FEATURE: Add a messages view for all official warnings of a user (#12659) 2021-06-14 14:01:17 -07:00
users-test.js FEATURE: Add user custom fields to user directory (#13238) 2021-06-07 12:34:01 -05:00