mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-10 14:54:42 +00:00
Merge pull request #1961 from asturur/fix-EnterEdit
Add forcedfocus on enterEditing
This commit is contained in:
commit
3b19175a70
2 changed files with 1 additions and 10 deletions
|
|
@ -325,6 +325,7 @@
|
|||
this.isEditing = true;
|
||||
|
||||
this.initHiddenTextarea();
|
||||
this.hiddenTextarea.focus();
|
||||
this._updateTextarea();
|
||||
this._saveEditingProps();
|
||||
this._setEditingProps();
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||
fabric.util.addListener(this.hiddenTextarea, 'keypress', this.onKeyPress.bind(this));
|
||||
fabric.util.addListener(this.hiddenTextarea, 'copy', this.copy.bind(this));
|
||||
fabric.util.addListener(this.hiddenTextarea, 'paste', this.paste.bind(this));
|
||||
|
||||
if (!this._clickHandlerInitialized && this.canvas) {
|
||||
fabric.util.addListener(this.canvas.upperCanvasEl, 'click', this.onClick.bind(this));
|
||||
this._clickHandlerInitialized = true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -49,11 +44,6 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||
88: 'cut'
|
||||
},
|
||||
|
||||
onClick: function() {
|
||||
// No need to trigger click event here, focus is enough to have the keyboard appear on Android
|
||||
this.hiddenTextarea && this.hiddenTextarea.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles keyup event
|
||||
* @param {Event} e Event object
|
||||
|
|
|
|||
Loading…
Reference in a new issue