Created
August 2, 2016 15:10
-
-
Save ruzia/177983d03dc88f7846b2744c9af50110 to your computer and use it in GitHub Desktop.
Patch: Working well in japanese ime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -8922,7 +8922,8 @@ TextEditor.prototype.open = function() { | |
this.instance.addHook('beforeKeyDown', onBeforeKeyDown); | |
}; | |
TextEditor.prototype.close = function(tdOutside) { | |
- this.textareaParentStyle.display = 'none'; | |
+ this.textareaParentStyle.top = '-9999px'; | |
+ this.textareaParentStyle.left = '-9999px'; | |
this.autoResize.unObserve(); | |
if (document.activeElement === this.TEXTAREA) { | |
this.instance.listen(); | |
@@ -8942,9 +8943,8 @@ TextEditor.prototype.createElements = function() { | |
this.TEXTAREA_PARENT = document.createElement('DIV'); | |
addClass(this.TEXTAREA_PARENT, 'handsontableInputHolder'); | |
this.textareaParentStyle = this.TEXTAREA_PARENT.style; | |
- this.textareaParentStyle.top = 0; | |
- this.textareaParentStyle.left = 0; | |
- this.textareaParentStyle.display = 'none'; | |
+ this.textareaParentStyle.top = '-9999px'; | |
+ this.textareaParentStyle.left = '-9999px'; | |
this.TEXTAREA_PARENT.appendChild(this.TEXTAREA); | |
this.instance.rootElement.appendChild(this.TEXTAREA_PARENT); | |
var that = this; | |
@@ -20733,6 +20733,12 @@ function TableView(instance) { | |
} | |
} | |
Handsontable.hooks.run(instance, 'afterOnCellMouseDown', event, coords, TD); | |
+ var activeEditor = instance.getActiveEditor(); | |
+ if (activeEditor) { | |
+ instance._registerTimeout(setTimeout(function() { | |
+ activeEditor.TEXTAREA.focus(); | |
+ }, 0)); | |
+ } | |
that.activeWt = that.wt; | |
}, | |
onCellMouseOver: function(event, coords, TD, wt) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment