Просмотр исходного кода

Set min-width on search form position element (#30473)

GitOrigin-RevId: 6f65eba9589f14f7d22668e925d819467c0ad4bd
Alf Eaton 9 месяцев назад
Родитель
Сommit
b69797e3f4

+ 9 - 7
services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx

@@ -442,13 +442,15 @@ const CodeMirrorSearchForm: FC<React.PropsWithChildren> = () => {
 
           <FullProjectSearchButton query={query} />
 
-          {position !== null && (
-            <div className="ol-cm-search-form-position">
-              {position.current === null ? '?' : position.current} {t('of')}{' '}
-              {position.total}
-              {position.interrupted && '+'}
-            </div>
-          )}
+          <div className="ol-cm-search-form-position">
+            {position !== null && (
+              <>
+                {position.current === null ? '?' : position.current} {t('of')}{' '}
+                {position.total}
+                {position.interrupted && '+'}
+              </>
+            )}
+          </div>
         </div>
 
         {showReplace && (

+ 1 - 0
services/web/frontend/js/features/source-editor/extensions/search.ts

@@ -407,6 +407,7 @@ const searchFormTheme = EditorView.theme({
   '.ol-cm-search-form-position': {
     flexShrink: 0,
     color: 'var(--content-secondary)',
+    minWidth: '5em',
   },
   '.ol-cm-search-hidden-inputs': {
     position: 'absolute',