mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-28 23:08:17 +00:00
Merge pull request #1573 from brexis/patch-1
Update itext_key_behavior.mixin.js
This commit is contained in:
commit
29c0448235
1 changed files with 2 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.keyCode in this._keysMap) {
|
||||
if (e.keyCode in this._keysMap && e.charCode === 0) {
|
||||
this[this._keysMap[e.keyCode]](e);
|
||||
}
|
||||
else if ((e.keyCode in this._ctrlKeysMap) && (e.ctrlKey || e.metaKey)) {
|
||||
|
|
@ -149,7 +149,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||
* @param {Event} e Event object
|
||||
*/
|
||||
onKeyPress: function(e) {
|
||||
if (!this.isEditing || e.metaKey || e.ctrlKey || e.keyCode in this._keysMap) {
|
||||
if (!this.isEditing || e.metaKey || e.ctrlKey || ( e.keyCode in this._keysMap && e.charCode === 0 )) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue