Skip to content

Commit a7d5297

Browse files
authored
Fix microsoft#229850. Inline editContext check in notebook webviewPreloads. (microsoft#229869)
1 parent f71675c commit a7d5297

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ async function webviewPreloads(ctx: PreloadContext) {
187187
}, 0);
188188
};
189189

190+
const isEditableElement = (element: Element) => {
191+
return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element;
192+
};
193+
190194
// check if an input element is focused within the output element
191195
const checkOutputInputFocus = (e: FocusEvent) => {
192196
lastFocusedOutput = getOutputContainer(e);
@@ -3106,7 +3110,3 @@ export function preloadsScriptStr(styleValues: PreloadStyles, options: PreloadOp
31063110
JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(ctx))}"))
31073111
)\n//# sourceURL=notebookWebviewPreloads.js\n`;
31083112
}
3109-
3110-
export function isEditableElement(element: Element): boolean {
3111-
return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element;
3112-
}

0 commit comments

Comments
 (0)