FEATURE: Allow DTooltip interaction (#20169)

This commit is contained in:
Jordan Vidrine 2023-02-06 09:59:34 -06:00 committed by GitHub
parent 8b4d571b9b
commit 9e1fcb2a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import Ember from "ember";
export default class DiscourseTooltip extends Component {
tagName = "";
interactive = false;
didInsertElement() {
this._super(...arguments);
@ -24,7 +25,9 @@ export default class DiscourseTooltip extends Component {
const viewBounds = Ember.ViewUtils.getViewBounds(this);
const element = viewBounds.firstNode;
const parent = viewBounds.parentElement;
const interactive = this.interactive;
this._tippyInstance = tippy(parent, {
interactive,
content: element,
trigger: this.capabilities.touch ? "click" : "mouseenter",
theme: "d-tooltip",