mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-28 23:10:46 +00:00
Remove flicker when resizing textareas
The `EditTextWidget.prototype.fixHeight()` function was defering its work with `nextTick()`, which led to flickering on all browsers when typing triggers a resize.
This commit is contained in:
parent
1d49e45deb
commit
d1bbe7253c
@ -206,7 +206,6 @@ EditTextWidget.prototype.fixHeight = function() {
|
||||
var self = this,
|
||||
domNode = this.domNodes[0];
|
||||
if(this.editAutoHeight && domNode && !domNode.isTiddlyWikiFakeDom && this.editTag === "textarea") {
|
||||
$tw.utils.nextTick(function() {
|
||||
// Resize the textarea to fit its content, preserving scroll position
|
||||
var scrollPosition = $tw.utils.getScrollPosition(),
|
||||
scrollTop = scrollPosition.y;
|
||||
@ -226,7 +225,6 @@ EditTextWidget.prototype.fixHeight = function() {
|
||||
scrollTop = Math.min(scrollTop,self.document.body.scrollHeight - window.innerHeight);
|
||||
window.scrollTo(scrollPosition.x,scrollTop);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user