Add ignoreWhilePending to railsUjs
What does this MR do and why?
This MR addresses an issue identified in this comment !81516 (comment 857772067) which is similar to issues like #353376 (closed).
The new bootstrap modals can be triggered multiple times while the promise is pending and the modal hasn't been created yet. There's a new utility which can be used in this situation called ignoreWhilePending
.
Screenshots or screen recordings
The Cancel button is tab focused and "Enter" is hit multiple times quickly.
Before | After |
---|---|
Screencast_2022-02-28_15_37_23 | Screencast_2022-02-28_15_38_43 |
How to set up and validate locally
Enable the :bootstrap_confirmation_modals
feature flag
Feature.enable(:bootstrap_confirmation_modals)
- Sign into your local gdk
- Visit
/flightjs/Flight/-/new/master/
- Enter a filename and some random file content
- Tab to the "Cancel" button
- Hit "Enter" multiple times quickly
- Only 1 cancel modal should appear at a time
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Paul Slaughter