Skip to content

Commit

Permalink
UI/ fix tooltip submitting form (hashicorp#16659)
Browse files Browse the repository at this point in the history
* fix tooltip submitting form

* add changelog

* add changelog actually
  • Loading branch information
hellobontempo authored Aug 10, 2022
1 parent 820575f commit 1d51c51
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/16659.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fix info tooltip submitting form
```
6 changes: 6 additions & 0 deletions ui/lib/core/addon/components/info-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ export default Component.extend({
attributeBindings: ['data-test-component'],
tagName: 'span',
classNames: ['is-inline-block'],

actions: {
preventSubmit(e) {
e.preventDefault();
},
},
});
1 change: 1 addition & 0 deletions ui/lib/core/addon/templates/components/info-tooltip.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@type="button"
class="tool-tip-trigger button is-ghost is-compact"
data-test-tool-tip-trigger={{true}}
onclick={{action "preventSubmit"}}
>
<Icon @name="info" class="auto-width" aria-label="help" />
</d.Trigger>
Expand Down

0 comments on commit 1d51c51

Please sign in to comment.