This is an automated email from the ASF dual-hosted git repository. pierrejeambrun pushed a commit to branch revert-57309-bugfix/log-text-selection in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 1f1d10761101407fc8356fcdac38fa1855de31dc Author: Pierre Jeambrun <[email protected]> AuthorDate: Wed Nov 5 16:42:55 2025 +0100 Revert "Fix text selection jumping in logs pane to match text editor behavior…" This reverts commit d6fa3b089cc18e87cff89b15d7b7ddd1dcafa8c3. --- .../src/pages/TaskInstance/Logs/TaskLogContent.tsx | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx index 8347bc54ee6..dab2a4c6676 100644 --- a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx +++ b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx @@ -100,11 +100,6 @@ export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap }: } }, [isLoading, rowVirtualizer, hash, parsedLogs]); - useLayoutEffect(() => { - // Force remeasurement when wrap changes since item heights will change - rowVirtualizer.measure(); - }, [wrap, rowVirtualizer]); - const handleScrollTo = (to: "bottom" | "top") => { if (parsedLogs.length > 0) { rowVirtualizer.scrollToIndex(to === "bottom" ? parsedLogs.length - 1 : 0); @@ -131,17 +126,10 @@ export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap }: position="relative" py={3} ref={parentRef} - textWrap={wrap ? "pre-wrap" : "nowrap"} + textWrap={wrap ? "pre" : "nowrap"} width="100%" > - <VStack - alignItems="flex-start" - gap={0} - h={`${rowVirtualizer.getTotalSize()}px`} - minH="100%" - position="relative" - width="100%" - > + <VStack alignItems="flex-start" gap={0} h={`${rowVirtualizer.getTotalSize()}px`}> {rowVirtualizer.getVirtualItems().map((virtualRow) => ( <Box _ltr={{ @@ -158,7 +146,6 @@ export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap }: data-index={virtualRow.index} data-testid={`virtualized-item-${virtualRow.index}`} key={virtualRow.key} - minWidth="100%" position="absolute" ref={rowVirtualizer.measureElement} top={`${virtualRow.start}px`} @@ -167,14 +154,6 @@ export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap }: {parsedLogs[virtualRow.index] ?? undefined} </Box> ))} - <Box - bottom={0} - left={0} - minH={`calc(100% - ${rowVirtualizer.getTotalSize()}px)`} - position="absolute" - top={`${rowVirtualizer.getTotalSize()}px`} - width="100%" - /> </VStack> </Code>
