Fixed issue #1291 - Block escape key when creating / editing text modules.
This commit is contained in:
parent
3babd8495e
commit
b7568b8ce2
2 changed files with 15 additions and 5 deletions
|
@ -581,6 +581,9 @@
|
||||||
// get correct val if textbox
|
// get correct val if textbox
|
||||||
$.fn.ceg = function() {
|
$.fn.ceg = function() {
|
||||||
var plugin = $.data(this[0], 'plugin_' + pluginName)
|
var plugin = $.data(this[0], 'plugin_' + pluginName)
|
||||||
|
if (!plugin) {
|
||||||
|
return
|
||||||
|
}
|
||||||
return plugin.value()
|
return plugin.value()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,14 +43,17 @@
|
||||||
|
|
||||||
this.$element.on('keydown', function (e) {
|
this.$element.on('keydown', function (e) {
|
||||||
|
|
||||||
// esc
|
|
||||||
if (e.keyCode === 27) {
|
|
||||||
_this.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
// navigate through item
|
// navigate through item
|
||||||
if (_this.isActive()) {
|
if (_this.isActive()) {
|
||||||
|
|
||||||
|
// esc
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
_this.close()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// enter
|
// enter
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
@ -106,7 +109,11 @@
|
||||||
menu.scrollTop( menu.scrollTop() + invisibleHeight )
|
menu.scrollTop( menu.scrollTop() + invisibleHeight )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// esc
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
_this.close()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue