sln-jack opened a new pull request, #72034:
URL: https://github.com/apache/airflow/pull/72034

    <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   
   > Previously, dragging across multiple lines in the task log view caused the 
selection to jump back to the top of the logs, making it impossible to select 
multiple lines reliably. This was caused by the combination of position: 
absolute and transform: translateY() on virtualized rows.
   
   This issue was originally reported in #55879 and fixed in #56238. It was 
then accidentally reverted in #60806, an unrelated performance optimization of 
`scrollToIndex`.
   
   This PR swaps out `translateY()` for `top` based positioning in the 
virtualized log line list, once again fixing text drag selection behavior on 
Firefox.
   
   * related: #55879
   * related: #56238
   * related: #60806
   
   ---
   
   Note I'm using the following Violentmonkey userscript to fix the selection 
behavior until my instance gets the fix:
   ```js
   // ==UserScript==
   // @name Fix airflow 3.3.1 log text selection
   // ==/UserScript==
   new MutationObserver(() => {
     const rows = document.querySelectorAll('[data-testid="virtualized-list"] 
[data-index]');
     for (const row of rows) {
       // Clear previous override
       row.style.transform = "";
   
       // Read original translateY()
       const { transform } = getComputedStyle(row);
       const translateY = new DOMMatrixReadOnly(transform).m42;
   
       // Override transform and position via top instead
       row.style.transform = "none";
       row.style.top = `${translateY}px`;
     }
   }).observe(document.body, {
     subtree: true,
     childList: true,
     attributes: true,
     attributeFilter: ["class"],
   });
   ```
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to