mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
Improving ux for search in webviews on web
This commit is contained in:
parent
e784e88a87
commit
bbc10afeda
1 changed files with 8 additions and 3 deletions
|
@ -994,13 +994,18 @@ onDomReady(() => {
|
|||
if (!target) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset selection so we start search after current find result
|
||||
const selection = target.contentWindow.getSelection();
|
||||
selection.collapse(selection.anchorNode);
|
||||
|
||||
const didFind = (/** @type {any} */ (target.contentWindow)).find(
|
||||
data.value,
|
||||
false,
|
||||
/* caseSensitive*/ false,
|
||||
/* backwards*/ data.previous,
|
||||
/* wrapAround*/ true,
|
||||
false,
|
||||
/*aSearchInFrames*/ true,
|
||||
/* wholeWord */ false,
|
||||
/* searchInFrames*/ false,
|
||||
false);
|
||||
hostMessaging.postMessage('did-find', didFind);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue