提交 b099d570 编写于 作者: R romainHainaut 提交者: Rob Lourens

Fix #83644 (#86619)

* Fix #83644

* correction for the PR, 24 is a constant and a comment in css

* putting the constant only in searchWidget not in constants

* forgot export keyword

* change comment in the css, as the constant is not in constant anymore

* missclick on erase export keyword, put it back

* spelling mistake correction
上级 272625b1
......@@ -42,6 +42,7 @@
max-height: 134px;
}
/* NOTE: height is also used in searchWidget.ts as a constant*/
.search-view .search-widget .monaco-inputbox > .wrapper > textarea.input {
overflow: initial;
height: 24px; /* set initial height before measure */
......
......@@ -35,6 +35,8 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
import { isMacintosh } from 'vs/base/common/platform';
export const OneLineHeight = 24;
export interface ISearchWidgetOptions {
value?: string;
replaceValue?: string;
......@@ -80,7 +82,7 @@ const ctrlKeyMod = (isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) {
const isMultiline = !!value.match(/\n/);
if (textarea && isMultiline && textarea.selectionStart > 0) {
if (textarea && (isMultiline || textarea.clientHeight > OneLineHeight) && textarea.selectionStart > 0) {
event.stopPropagation();
return;
}
......@@ -88,7 +90,7 @@ function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string
function stopPropagationForMultiLineDownwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) {
const isMultiline = !!value.match(/\n/);
if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) {
if (textarea && (isMultiline || textarea.clientHeight > OneLineHeight) && textarea.selectionEnd < textarea.value.length) {
event.stopPropagation();
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册