We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 517910b commit ae517d9Copy full SHA for ae517d9
src/App.svelte
@@ -272,7 +272,17 @@
272
{/snippet}
273
274
<svelte:window
275
- onpaste={(e) => actions.Paste(e, globals)}
+ onpaste={(e) => {
276
+ // Don't handle keypresses from within text or other editable inputs
277
+ if (
278
+ globals.mode == "insert" ||
279
+ ["input", "textarea"].includes(e.target?.tagName.toLocaleLowerCase()) ||
280
+ e.target.isContentEditable
281
+ ) {
282
+ return;
283
+ }
284
+ actions.Paste(e, globals);
285
+ }}
286
ondragover={(e) => e.preventDefault(/* Necessary for drop handler to work */)}
287
ondrop={(e) => actions.Paste(e, globals)}
288
onkeydown={(e) => keyboardHandler(e, globals)}
0 commit comments