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

AOSP-based Android back gesture causes touch loss in Qt for WebAssembly apps

XMLWordPrintable

    • Android, WebAssembly

      • Using the browser’s own back button, or the 3-button navigation system “Back” key works fine.
      •  Problem only occurs with system-level gesture navigation on AOSP-based Android builds.
      • Custom ROMs (e.g. MIUI / HyperOS) do not show this issue.

      A simple example:

       

      import QtQuick 2.15
      import QtQuick.Window 2.15Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          Rectangle {        width: 50
              height: 50
              color:"green"
              radius: width/2
              DragHandler  {        }
          }
      }
      
      // Prevent back in JS 
      <script>
      window.addEventListener('load', function() {
          history.pushState(null, null, location.href);    window.addEventListener('popstate', function(event) {
              history.pushState(null, null, location.href);
              alert("11");
          });
      });
      </script>

      I tested using multiple browsers on Android12/15 devices.

      The expected outcome is that the go back of full-screen gestures is consistent with other go back. The actual outcome is that the go back of full-screen gestures will cause the touch loss of the qt for wasm application, and the program is not blocked, but cannot interact. I tried logcat and there were no related errors, and there was no error output on the console, so it is speculated that Qt for wasm did not handle related events?

      2025-10-29 09:23:43.557  5495-5612  Surface                 com.android.systemui                 D  Surface::disconnect
      2025-10-29 09:23:43.557  5495-5612  BufferQueueProducer     com.android.systemui                 D  [EdgeBackGestureHandler0#73599(BLAST Consumer)pid:5495](id:15770000157f,api:1,p:5495,c:5495) disconnect: api 1 

       

       

        1. demo.7z
          1.10 MB
          lzh lzh
        For Gerrit Dashboard: QTBUG-141505
        # Subject Branch Project Status CR V

            qt.webassembly qt.webassembly
            lzhdsd lzh lzh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change