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

Event.timeStamp is always 0 for JS key events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.1, 5.12.2, 5.13.0, 5.15.4
    • 5.12.0
    • WebEngine
    • None
    • Linux/X11
    • 123f97da6e6bb718682ba046a9ee82a24403cd86 (qt/qtwebengine/5.12)

    Description

      See https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp

      Try this with simplebrowser: https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp#Result

      I have tried this on Linux only but I assume all platforms are affected.

      The problem is with currentTimeForEvent() function in src/core/web_event_factory.cpp:
      It uses base::TimeTicks::FromInternalValue() to convert Qt timestamp to base::TimeTicks. This function is deprecated and seems to convert to a wrong value.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pvarga Peter Varga
            pvarga Peter Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes