mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Fix #67661
This commit is contained in:
parent
996b5c345b
commit
9deb608cc6
|
@ -440,14 +440,16 @@ export class SearchWidget extends Widget {
|
||||||
|
|
||||||
else if (keyboardEvent.equals(KeyCode.UpArrow)) {
|
else if (keyboardEvent.equals(KeyCode.UpArrow)) {
|
||||||
const ta = this.searchInput.domNode.querySelector('textarea');
|
const ta = this.searchInput.domNode.querySelector('textarea');
|
||||||
if (ta && ta.selectionStart > 0) {
|
const isMultiline = !!this.searchInput.getValue().match(/\n/);
|
||||||
|
if (ta && isMultiline && ta.selectionStart > 0) {
|
||||||
keyboardEvent.stopPropagation();
|
keyboardEvent.stopPropagation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (keyboardEvent.equals(KeyCode.DownArrow)) {
|
else if (keyboardEvent.equals(KeyCode.DownArrow)) {
|
||||||
const ta = this.searchInput.domNode.querySelector('textarea');
|
const ta = this.searchInput.domNode.querySelector('textarea');
|
||||||
if (ta && ta.selectionEnd < ta.value.length) {
|
const isMultiline = !!this.searchInput.getValue().match(/\n/);
|
||||||
|
if (ta && isMultiline && ta.selectionEnd < ta.value.length) {
|
||||||
keyboardEvent.stopPropagation();
|
keyboardEvent.stopPropagation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue