0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Remove ZWS and parent empty inlines on blur

Resolves #461
This commit is contained in:
Neil Jenkins 2024-07-17 15:18:27 +10:00
parent 72bfb9232f
commit 333d5fbd09

View file

@ -156,6 +156,9 @@ class Squire {
this.addEventListener('touchstart', this._disableRestoreSelection); this.addEventListener('touchstart', this._disableRestoreSelection);
this.addEventListener('focus', this._restoreSelection); this.addEventListener('focus', this._restoreSelection);
// On blur, cleanup any ZWS/empty inlines
this.addEventListener('blur', this._removeZWS);
// Clipboard support // Clipboard support
this._isShiftDown = false; this._isShiftDown = false;
this.addEventListener('cut', _onCut as (e: Event) => void); this.addEventListener('cut', _onCut as (e: Event) => void);