()
| 272 | } |
| 273 | |
| 274 | addTargetEvents() { |
| 275 | if (this.props.trigger) { |
| 276 | let triggers = this.props.trigger.split(' '); |
| 277 | if (triggers.indexOf('manual') === -1) { |
| 278 | if (triggers.indexOf('click') > -1 || triggers.indexOf('legacy') > -1) { |
| 279 | document.addEventListener('click', this.handleDocumentClick, true); |
| 280 | } |
| 281 | |
| 282 | if (this._targets && this._targets.length) { |
| 283 | if (triggers.indexOf('hover') > -1) { |
| 284 | this.addEventOnTargets('mouseover', this.showWithDelay, true); |
| 285 | this.addEventOnTargets('mouseout', this.hideWithDelay, true); |
| 286 | } |
| 287 | if (triggers.indexOf('focus') > -1) { |
| 288 | this.addEventOnTargets('focusin', this.show, true); |
| 289 | this.addEventOnTargets('focusout', this.hide, true); |
| 290 | } |
| 291 | this.addEventOnTargets('keydown', this.onEscKeyDown, true); |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | removeTargetEvents() { |
| 298 | if (this._targets) { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…