Skip to content

a-scene Chrome non-passive violation warnings for touchmove and touchstart event handlers #5510

@mitchallen

Description

@mitchallen

Description:

For a simple scene, Chrome is logging these warnings to the console:

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
look-controls.js:163 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

The error references: https://www.chromestatus.com/feature/5745543795965952

Links referred to in console for 1.5.0:

  • A-Frame Version: 1.5.0
  • Platform / Device: Google Chrome Version 123.0.6312.107 (Official Build) (arm64)
  • Reproducible Code Snippet or URL:

I think all you need to reproduce it is a <a-scene /> - but here's an example using look-controls too:

    <a-scene>
        <a-assets>
            <!-- TODO -->
        </a-assets>
        <a-entity id="rig" position="0 0 0">
            <a-camera id="camera" look-controls="enabled: true"></a-camera>
        </a-entity>
        <a-plane position="0 0 0" rotation="-90 0 0" width="4" height="4" color="#222222"></a-plane>
        <a-sky color="#333333"></a-sky>
    </a-scene>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions