Skip to content
Permalink
Browse files

fix(tooltip, popover): hide trigger element title attribute during sh…

…ow delay (fixes #4114) (#4120)
  • Loading branch information...
tmorehouse committed Sep 18, 2019
1 parent d9900ab commit 2dd8d5a6b1e70157f7127021ec160630eeb9cd59
@@ -413,6 +413,8 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
// Hide the tooltip
const tip = this.getTemplateElement()
if (!tip || !this.localShow) {
/* istanbul ignore next */
this.restoreTitle()
/* istanbul ignore next */
return
}
@@ -613,7 +615,7 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
const target = this.getTarget()
if (target && hasAttr(target, 'data-original-title')) {
setAttr(target, 'title', getAttr(target, 'data-original-title') || '')
setAttr(target, 'data-original-title', '')
removeAttr(target, 'data-original-title')
}
},
//
@@ -886,9 +888,14 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
if (!this.computedDelay.show) {
this.show()
} else {
// Hide any title attribute while enter delay is active
this.fixTitle()
this.hoverTimeout = setTimeout(() => {
/* istanbul ignore else */
if (this.$_hoverState === 'in') {
this.show()
} else if (!this.localShow) {
this.restoreTitle()
}
}, this.computedDelay.show)
}
@@ -446,11 +446,11 @@ Where `[mod]` can be (all optional):
- `nofade` to turn off animation.
- `html` to enable rendering raw HTML. by default HTML is escaped and converted to text.
- A delay value in the format of `d###` (where `###` is in ms, defaults to `50`), applied to both
`hide` and `show` (affects `hover` and `focus` only)
`hide` and `show`.
- A show delay value in the format of `ds###` (where `###` is in ms, defaults to `50`), applied to
`show` trigger only (affects `hover` and `focus` only)
`show` trigger only.
- A hide delay value in the format of `dh###` (where `###` is in ms, defaults to `50`), applied to
`hide` trigger only (affects `hover` and `focus` only)
`hide` trigger only.
- An offset value in pixels in the format of `o###` (where `###` is the number of pixels, defaults
to `0`. Negative values are allowed). Note if an offset is supplied, then the alignment positions
will fallback to one of `top`, `bottom`, `left`, or `right`.
@@ -309,24 +309,24 @@ Where `[modX]` can be (all optional):

- Positioning: `top`, `bottom`, `left`, `right`, `auto`, `topleft`, `topright`, `bottomleft`,
`bottomright`, `lefttop`, `leftbottom`, `righttop`, or `rightbottom` (last one found wins,
defaults to `top`)
defaults to `top`).
- Event trigger: `click`, `hover`, `focus`, `blur` (if none specified, defaults to `focus` and
`hover`. `blur` is a close handler only, and if specified by itself, will be converted to
`focus`). Use `manual` if you only want to control the visibility manually.
- `nofade` to turn off animation
- `nofade` to turn off animation.
- `html` to enable rendering raw HTML. By default HTML is escaped and converted to text
- A delay value in the format of `d###` (where `###` is in ms, defaults to `50`), applied to both
`hide` and `show` (affects `hover` and `focus` only)
`hide` and `show`.
- A show delay value in the format of `ds###` (where `###` is in ms, defaults to `50`), applied to
`show` trigger only (affects `hover` and `focus` only)
`show` trigger only.
- A hide delay value in the format of `dh###` (where `###` is in ms, defaults to `50`), applied to
`hide` trigger only (affects `hover` and `focus` only)
`hide` trigger only.
- An offset value in pixels in the format of `o###` (where `###` is the number of pixels, defaults
to `0`. Negative values allowed)
to `0`. Negative values allowed).
- A boundary setting of `window` or `viewport`. The element to constrain the visual placement of the
tooltip. If not specified, the boundary defaults to the trigger element's scroll parent (in most
cases this will suffice)
- A contextual variant in the form of `v-XXX` (where `XXX` is the color variant name)
cases this will suffice).
- A contextual variant in the form of `v-XXX` (where `XXX` is the color variant name).

Where `<value>` can be (optional):

0 comments on commit 2dd8d5a

Please sign in to comment.
You can’t perform that action at this time.