From c2ecb8876d89b88bbbba5a6fc0365996e409aa40 Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Thu, 30 May 2024 12:17:23 -0400 Subject: [PATCH] Merge pull request #18525 from overleaf/jdt-disable-indenttaion-safari [Web] Disable indentation markers on Safari GitOrigin-RevId: 7a62382e6d4a4ecf0bd144ab937f6e197d173bdb --- .../source-editor/extensions/indentation-markers.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/extensions/indentation-markers.ts b/services/web/frontend/js/features/source-editor/extensions/indentation-markers.ts index 2811b5026c..2e5c9a45ed 100644 --- a/services/web/frontend/js/features/source-editor/extensions/indentation-markers.ts +++ b/services/web/frontend/js/features/source-editor/extensions/indentation-markers.ts @@ -1,12 +1,17 @@ import { Extension } from '@codemirror/state' import { indentationMarkers as markers } from '@replit/codemirror-indentation-markers' import { sourceOnly } from './visual/visual' +import browser from './browser' /** * A third-party extension which adds markers to show the indentation level. * Configured to omit markers in the first column and to keep the same style for markers in the active block. */ -export const indentationMarkers = (visual: boolean): Extension => - sourceOnly(visual, [ - markers({ hideFirstIndent: true, highlightActiveBlock: false }), - ]) +export const indentationMarkers = (visual: boolean): Extension => { + // disable indentation markers in Safari due to flicker, ref to git issue: 18263 + return browser.safari + ? [] + : sourceOnly(visual, [ + markers({ hideFirstIndent: true, highlightActiveBlock: false }), + ]) +}