Below is a small Vue component for a note preview panel. After a recent PR, the panel started behaving unreliably: when using the keyboard, closing happens at unexpected moments, and a deferred update keeps running even when it no longer matches the current state.
after.Escape only while open === true;draft changes;open=true.Escape outside the panel.draft several times in a row.Escape key should not remain active after the panel is closed or the component is destroyed.draft change or after the component is destroyed.3.5.135.8.xscript setupprops:
open: booleandraft: stringclosewindow.setTimeout(...) with a 250 ms delayUse line comments to explain the problem, its impact, the fix and how to test it.