0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

🐛 Fixed broken close buttons on modals (#15514)

* 🐛 Fixed broken `close` button on modals
no issue

Some modals' close elements containing `{{on "click" @close}}` and `href=""` would not take the 'on cl
ick' function into account, meaning the whole page would get redirected to "/" (back to the root of the dashboard) instead of just closing the modal.
This commit is contained in:
Ronald Langeveld 2022-10-04 04:33:49 +02:00 committed by GitHub
parent 8751245fa5
commit 226794e201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
<header class="modal-header" data-test-modal="add-label-members">
<h1>Add Label</h1>
</header>
<a class="close" href="" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<button type="button" class="close" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
{{#if this.hasRun}}
<div class="gh-content-box pa" data-test-state="add-complete">

View file

@ -2,7 +2,7 @@
<header class="modal-header" data-test-modal="remove-label-members">
<h1>Remove Label</h1>
</header>
<a class="close" href="" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<button type="button" class="close" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
{{#if this.hasRun}}
<div class="gh-content-box pa" data-test-state="remove-complete">

View file

@ -2,7 +2,7 @@
<header class="modal-header" data-test-modal="unsubscribe-members">
<h1>Unsubscribe members from email?</h1>
</header>
<a class="close" href="" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<button type="button" class="close" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
{{#if this.hasRun}}
<div class="gh-content-box pa" data-test-state="unsubscribe-complete">

View file

@ -2,7 +2,7 @@
<header class="modal-header">
<h1>Are you sure?</h1>
</header>
<a class="close" href="" role="button" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
<button type="button" class="close" title="Close" {{on "click" @close}}>{{svg-jar "close"}}<span class="hidden">Close</span></button>
<div class="modal-body">
<p>