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

Qt WebEngine does not support mouse back/forward buttons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.15.1
    • 5.15
    • WebEngine
    • None
    • Linux/X11
    • 98ecea4b23c2e3122fda6e5b1df0e23a56d93ffe (qt/qtwebengine/5.15)

      onclick handlers are never fired for mouse buttons 4 and 5 (the back and forward buttons on the mouse). The following simple PyQt script reproduces the problem. SImply click anywhere in the window ad yu get an alert, but this happens only when left clicking, not when pressing the 4th or 5th buttons on the mouse.

       

      from PyQt5.QtWebEngineWidgets import QWebEngineView
      from PyQt5.Qt import QApplication, QMainWindow

      app = QApplication([])
      mw = QMainWindow()
      w = QWebEngineView()
      w.setHtml('''<body onclick="alert(1111)"><p>hello world''')
      mw.setCentralWidget(w)
      mw.show()
      app.exec_()

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

            qt_webengine_team Qt WebEngine Team
            kovidgoyal Kovid Goyal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes