Skip to content

Commit

Permalink
fix: manual tooltip closing on document touch, closes #158
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 28, 2019
1 parent 150d54f commit 1659ce5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/tooltip.js
Expand Up @@ -184,16 +184,16 @@ export default class Tooltip {

_init () {
// get events list
const events = typeof this.options.trigger === 'string'
? this.options.trigger
.split(' ')
.filter(
trigger => ['click', 'hover', 'focus'].indexOf(trigger) !== -1
)
let events = typeof this.options.trigger === 'string'
? this.options.trigger.split(' ')
: []
this._isDisposed = false
this._enableDocumentTouch = events.indexOf('manual') === -1

events = events.filter(
trigger => ['click', 'hover', 'focus'].indexOf(trigger) !== -1
)

// set event listeners
this._setEventListeners(this.reference, events, this.options)

Expand Down

0 comments on commit 1659ce5

Please sign in to comment.