lib/suggestion-list-element.js
// events because they are handled at the document
events because they are handled at the document
events because they are handled at the document
registerMouseHandling () {
    this.element.onmousewheel = event => event.stopPropagation()
    this.element.onmousedown = (event) => {
      const item = this.findItem(event)
      if (item && item.dataset && item.dataset.index) {
        this.selectedIndex = item.dataset.index
        event.stopPropagation()
      }
    }
    this.element.onmouseup = (event) => {
      const item = this.findItem(event)
      if (item && item.dataset && item.dataset.index) {
        event.stopPropagation()
        this.confirmSelection()
      }
    }
  }
registerMouseHandling ( ) { this . element . onmousewheel = event => event . stopPropagation ( ) this . element . onmousedown = ( event ) => { const item = this . findItem ( event ) if ( item && item . dataset && item . dataset . index ) { this . selectedIndex = item . dataset . index event . stopPropagation ( ) } } this . element . onmouseup = ( event ) => { const item = this . findItem ( event ) if ( item && item . dataset && item . dataset . index ) { event . stopPropagation ( ) this . confirmSelection ( ) } } }
events because they are handled at the document
events because they are handled at the document