Skip to content
Permalink
Browse files
fi(tooltip/popover): handle click blur on iOS webkit browsers (fixes
…#5099) (#5103)

* fi(tooltip/popover): handle `click blur` on iOS webkit browsers

* Update bv-tooltip.js

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
  • Loading branch information
tmorehouse and jacobmllr95 committed Apr 6, 2020
1 parent e4d2671 commit 27da76cdc70449b0564e31f5733df97d758652ea
Showing 1 changed file with 12 additions and 1 deletion.
@@ -247,6 +247,8 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
this.clearVisibilityInterval()
// Destroy the template
this.destroyTemplate()
// Remove any other private properties created during create
this.$_noop = null
},
methods: {
// --- Methods for creating and destroying the template ---
@@ -830,11 +832,20 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
this.enable()
}
},
click() {
click(evt) {
if (!this.$_enabled || this.dropdownOpen()) {
/* istanbul ignore next */
return
}
try {
// Get around a WebKit bug where `click` does not trigger focus events
// On most browsers, `click` triggers a `focusin`/`focus` event first
// Needed so that trigger 'click blur' works on iOS
// https://github.com/bootstrap-vue/bootstrap-vue/issues/5099
// We use `currentTarget` rather than `target` to trigger on the
// element, not the inner content
evt.currentTarget.focus()
} catch {}
this.activeTrigger.click = !this.activeTrigger.click
if (this.isWithActiveTrigger) {
this.enter(null)

0 comments on commit 27da76c

Please sign in to comment.