forked from comfy/comfortable-mexican-sofa
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove data-disable-with attributes on the page update form
- Loading branch information
1 parent
31a9844
commit af5b6da
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
af5b6da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
why was this change made?
Is there any contraindication to reverting to the previous behavior?
Thank you
af5b6da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the use of Rails UJS is deprecated in Rails 7 (it is no more on by default) but until Rails 6 the data attribute is in charge of leaving the preview button enabled once clicked, in order to let confirm the changes or not if the preview is ok.
A better implementation could take in consideration the presence of UJS or a different and custom implementation (excluding Rails UJS and data attribute) and a configuration setting.
The use of
config.action_view.automatically_disable_submit_tag = false
is not advisable if UJS is used in frontend side where the behaviour could be expected.Any advise @johnnaegle ?