From e551488e559b86be014272d18a5c3e69e554a230 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Fri, 15 Mar 2019 14:38:54 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20difficult=20to=20cancel?= =?UTF-8?q?=20webhook=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://github.com/TryGhost/Ghost/issues/10135 - `focusOut` events are fired before the `click` event is fired when clicking buttons whilst an input has focus, this has the effect of triggering our on-blur validations that can cause UI to jump which then results in the `mouseUp` being outside of the button which means no `click` event is fired - stops `mouseDown` event from bubbling from modal cancel/close buttons so that `focusOut` validations aren't triggered --- app/templates/components/modal-invite-new-user.hbs | 5 ++++- app/templates/components/modal-new-integration.hbs | 13 +++++++++++-- app/templates/components/modal-new-subscriber.hbs | 12 ++++++++++-- app/templates/components/modal-webhook-form.hbs | 12 ++++++++++-- ember-cli-build.js | 2 +- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/app/templates/components/modal-invite-new-user.hbs b/app/templates/components/modal-invite-new-user.hbs index d8b1a13c23..8ccc187eb8 100644 --- a/app/templates/components/modal-invite-new-user.hbs +++ b/app/templates/components/modal-invite-new-user.hbs @@ -1,7 +1,10 @@ -{{svg-jar "close"}} +{{!-- disable mouseDown so it doesn't trigger focus-out validations --}} + + {{svg-jar "close"}} +