File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/routes/tutorial/[slug] Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 232
232
233
233
< svelte: window
234
234
on: pointerdown= {(e ) => {
235
- console .log (` pointerdown ${ container .contains (e .target )} ` );
236
235
if (! container .contains (/** @type {HTMLElement} */ (e .target ))) {
237
236
preserve_editor_focus = false ;
238
237
}
253
252
254
253
setTimeout (() => {
255
254
preserve_editor_focus = true ;
256
- }, 100 );
255
+ }, 200 );
257
256
}
258
257
}}
259
258
on: focusin= {() => {
260
259
preserve_editor_focus = true ;
261
260
}}
262
261
on: focusout= {() => {
263
- if (preserve_editor_focus) {
264
- setTimeout (() => {
262
+ // Little timeout, because inner postMessage event might take a little
263
+ setTimeout (() => {
264
+ if (preserve_editor_focus) {
265
265
instance? .editor .focus ();
266
- }, 0 );
267
- }
266
+ }
267
+ }, 100 );
268
268
}}
269
269
/ >
270
270
< / div>
You can’t perform that action at this time.
0 commit comments