From a1cef4a72a0c2bb227bc1210993370acf43fcce4 Mon Sep 17 00:00:00 2001 From: claire bontempo <68122737+hellobontempo@users.noreply.github.com> Date: Tue, 9 Aug 2022 20:51:29 -0700 Subject: [PATCH] UI/ fix tooltip submitting form (#16659) * fix tooltip submitting form * add changelog * add changelog actually --- changelog/16659.txt | 3 +++ ui/lib/core/addon/components/info-tooltip.js | 6 ++++++ ui/lib/core/addon/templates/components/info-tooltip.hbs | 1 + 3 files changed, 10 insertions(+) create mode 100644 changelog/16659.txt diff --git a/changelog/16659.txt b/changelog/16659.txt new file mode 100644 index 000000000..c20261625 --- /dev/null +++ b/changelog/16659.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix info tooltip submitting form +``` diff --git a/ui/lib/core/addon/components/info-tooltip.js b/ui/lib/core/addon/components/info-tooltip.js index 822453b24..c72fd4874 100644 --- a/ui/lib/core/addon/components/info-tooltip.js +++ b/ui/lib/core/addon/components/info-tooltip.js @@ -7,4 +7,10 @@ export default Component.extend({ attributeBindings: ['data-test-component'], tagName: 'span', classNames: ['is-inline-block'], + + actions: { + preventSubmit(e) { + e.preventDefault(); + }, + }, }); diff --git a/ui/lib/core/addon/templates/components/info-tooltip.hbs b/ui/lib/core/addon/templates/components/info-tooltip.hbs index 3fa31a279..c5fa1c9f0 100644 --- a/ui/lib/core/addon/templates/components/info-tooltip.hbs +++ b/ui/lib/core/addon/templates/components/info-tooltip.hbs @@ -4,6 +4,7 @@ @type="button" class="tool-tip-trigger button is-ghost is-compact" data-test-tool-tip-trigger={{true}} + onclick={{action "preventSubmit"}} >