mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-01 20:12:11 +00:00
fix: redrawing problem on every key stroke
This commit is contained in:
parent
2e0e3c7bab
commit
e07ae77044
1 changed files with 6 additions and 1 deletions
|
|
@ -45,11 +45,16 @@ export class ContentEditableOnClickDirective implements OnInit, OnDestroy {
|
|||
window.clearTimeout(this._redrawTimeout);
|
||||
// this fixes the bug where the text is not visible for some time
|
||||
// by triggering a redraw via el.offsetHeight
|
||||
this._redrawTimeout = window.setTimeout(() => this._el.offsetHeight, 30);
|
||||
// this._redrawTimeout = window.setTimeout(() => this._el.offsetHeight, 30);
|
||||
});
|
||||
|
||||
el.addEventListener('input', (ev) => {
|
||||
this._setValueFromElement();
|
||||
|
||||
// this fixes the bug where the text is not visible for some time
|
||||
// by triggering a redraw via el.offsetHeight
|
||||
// tslint:disable-next-line
|
||||
this._el.offsetHeight;
|
||||
});
|
||||
|
||||
el.addEventListener('blur', (ev) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue