Fixed newsletter clicks not updating in Safari

refs https://github.com/TryGhost/Team/issues/2619

- blur event occurs before mouseup event is called, so when the update button was clicked, the update function has never been called in Safari
- this replaces the mouseup with mousedown which is called before the blur event, so the links are updated properly
This commit is contained in:
Sodbileg Gansukh 2023-05-10 15:40:57 +08:00
parent 9ac8301f5b
commit b668ca3943

View File

@ -45,7 +45,7 @@
<button
class="gh-btn gh-btn-red gh-btn-icon gh-links-list-item-update-button"
type="button"
{{on "mouseup" this.setLink}}
{{on "mousedown" this.setLink}}
data-test-button="cancel-webhook"
>
<span>Retry</span>
@ -54,8 +54,9 @@
<button
class="gh-btn gh-btn-green gh-btn-icon gh-links-list-item-update-button"
type="button"
{{on "mouseup" this.setLink}}
{{on "mousedown" this.setLink}}
data-test-button="cancel-webhook"
tabindex="-1"
>
<span>Update</span>
</button>