Fixed issue #884 - Firefox - Focus lost after using :: TextSnippts.

This commit is contained in:
Rolf Schmidt 2017-07-07 16:47:15 +02:00
parent 74ebb10d2c
commit 672b1ab40c

View file

@ -180,7 +180,7 @@
Plugin.prototype.renderBase = function() { Plugin.prototype.renderBase = function() {
this.$element.after('<div class="shortcut dropdown"><ul class="dropdown-menu" style="max-height: 200px;"></ul></div>') this.$element.after('<div class="shortcut dropdown"><ul class="dropdown-menu" style="max-height: 200px;"></ul></div>')
this.$widget = this.$element.next() this.$widget = this.$element.next()
this.$widget.on('click', 'li', $.proxy(this.onEntryClick, this)) this.$widget.on('mousedown', 'li', $.proxy(this.onEntryClick, this))
this.$widget.on('mouseenter', 'li', $.proxy(this.onMouseEnter, this)) this.$widget.on('mouseenter', 'li', $.proxy(this.onMouseEnter, this))
} }
@ -313,6 +313,7 @@
} }
Plugin.prototype.onEntryClick = function(event) { Plugin.prototype.onEntryClick = function(event) {
event.preventDefault()
var id = $(event.target).data('id') var id = $(event.target).data('id')
this.take(id) this.take(id)
} }