Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137194

Label transform on `:focus-within` never runs in Qt browser until CSS is re-applied

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.9.0
    • WebEngine
    • None
    • Windows
    • Windows

    Description

      A CSS animation (using transform with a transition) is defined on the container’s :focus-within state to “float” and shrink the <label> when its corresponding <input> gains focus. In a Qt-based browser:

      • The focus state is correctly detected (the CSS rule appears in DevTools).
      • The style is updated (you can see the new transform in the inspector).
      • However, the animation never actually runs, so the label remains static.

      Only after opening DevTools and making any edit to the CSS (which forces a style refresh) does the animation finally trigger. In mainstream browsers (Chrome, Firefox, Safari), the transform/animation applies immediately on first focus without any manual CSS re-application.

       

      Steps to reproduce:

      • Open the attached file `focus-within-bug.html` in a Qt-based browser.
      • Click into the text input, observe the label remains in its original position; no animation fires.
      • Open DevTools, modify any character in the <style> block, then close DevTools.
      • Click the input again, observer the label animates as expected (shrinks and floats).

       

      Environment:

      • OS: Windows
      • This bug could be reproduced with Example Qt Browser (Qt WebEngine 6.9.0)
      • This bug could not be reproduced with both Chromium 130.0.6723.192 and 133.0.6943.141 (the base and security versions declared by Qt 6.9) on Windows

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-137194
          # Subject Branch Project Status CR V

          Activity

            People

              kchehlarski Kaloyan Chehlarski
              gerald_li Gerald Li
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change