Skip to content

Commit

Permalink
Adds focus: false to newly created modal dialogs (#3539)
Browse files Browse the repository at this point in the history
Without forcing `focus: false`, a Bootstrap modal rendered by RailsAdmin will not allow other modals to have focus for their inputs. This breaks tools like CKEditor (when adding a link within the WYSIWYG, for example, users are unable to interact with fields within the link popup).

ref: https://getbootstrap.com/docs/5.0/components/modal/#options
  • Loading branch information
tosbourn authored Jul 12, 2022
1 parent 0ebbd85 commit 4609fc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rails_admin/remote-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ import * as bootstrap from "bootstrap";
new bootstrap.Modal(widget.dialog[0], {
keyboard: true,
backdrop: true,
focus: false,
show: true,
}).show();
}
Expand Down

0 comments on commit 4609fc6

Please sign in to comment.