mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
This commit is contained in:
@@ -187,6 +187,10 @@ async function webviewPreloads(ctx: PreloadContext) {
|
||||
}, 0);
|
||||
};
|
||||
|
||||
const isEditableElement = (element: Element) => {
|
||||
return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element;
|
||||
};
|
||||
|
||||
// check if an input element is focused within the output element
|
||||
const checkOutputInputFocus = (e: FocusEvent) => {
|
||||
lastFocusedOutput = getOutputContainer(e);
|
||||
@@ -3106,7 +3110,3 @@ export function preloadsScriptStr(styleValues: PreloadStyles, options: PreloadOp
|
||||
JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(ctx))}"))
|
||||
)\n//# sourceURL=notebookWebviewPreloads.js\n`;
|
||||
}
|
||||
|
||||
export function isEditableElement(element: Element): boolean {
|
||||
return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user