1
0
mirror of synced 2024-11-22 21:16:10 +03:00

change enter and delete key behaviors. fixes #295

This commit is contained in:
Igor Vaynberg 2012-08-03 21:50:12 -07:00
parent 15b654a170
commit bc9867af0b

View File

@ -1360,7 +1360,15 @@
return; return;
} }
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) { if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)
|| e.which === KEY.ESC || e.which == KEY.ENTER) {
return;
}
if (e.which == KEY.DELETE) {
if (this.opts.allowClear) {
this.clear();
}
return; return;
} }
@ -1686,7 +1694,8 @@
} }
} }
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.BACKSPACE || e.which === KEY.ESC) { if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)
|| e.which === KEY.BACKSPACE || e.which === KEY.ESC || e.which === KEY.ENTER) {
return; return;
} }