You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<%= render(Primer::Alpha::Dialog.new(id: "my-dialog", title: title, subtitle: subtitle)) do |d| %><% d.with_show_button { button_text } %><formclass="pt-3"><%= render(Primer::Alpha::Dialog::Body.new) do %>
This is a custom dialog with the body and footer wrapped in a form tag.
<inputid="dialog-text-input-example" type="text" value="Some text goes in here" autocomplete="off"><% end %><%= render(Primer::Alpha::Dialog::Footer.new(show_divider: show_divider)) do %><%= render(Primer::Beta::Button.new(data: { "close-dialog-id": "my-dialog" })) { "Cancel" } %><%= render(Primer::Beta::Button.new(scheme: :primary, type: :submit)) { "Submit" } %><% end %></form><% end %>
Actual behavior
An outside click closes the dialog and all unsaved changes are gone
By default, clicking on the backdrop will dismiss the dialog. However, if the dialog contains a form that can have unsaved changes, the backdrop won't dismiss the dialog, regardless of the state of the form.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: