zdhxiong / mdui

Material Design 3(Material You) UI components using Web Components.
https://www.mdui.org
4.16k stars 364 forks source link

mdui-tabs warning each time a tab is clicked. #328

Closed aabluedragon closed 3 months ago

aabluedragon commented 4 months ago

When clicking on an mdui-tab, a console warning is logged with the following message:

[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

Example https://jsbin.com/movopey/edit?html,output

Code

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>mdui tabs warning</title>
  <link rel="stylesheet" href="https://unpkg.com/mdui@2/mdui.css">
<script src="https://unpkg.com/mdui@2/mdui.global.js"></script>
</head>
<body>
  Click on the tabs to switch, and you'll see a warning in devtools console
  <mdui-tabs>
      <mdui-tab>
        Tab 1
      </mdui-tab>
      <mdui-tab>
        Tab 2
      </mdui-tab>
  </mdui-tabs>
  <script src="//cdnjs.cloudflare.com/ajax/libs/mdui/0.4.0/js/mdui.min.js"></script>
</body>
</html>
zdhxiong commented 3 months ago

I cannot reproduce the issue. Please check if the warning is from a browser plugin. If you confirm it is caused by mdui, please provide the browser version and more details.

aabluedragon commented 3 months ago

I'm seeing this consistently happening on Incognito (and normal) Chrome Desktop 126.0.6478.127 (Official Build) (64-bit). However, on a "clean" chrome launch (chrome --user-data-dir=C:\somedir) indeed it doesn't happen. closed.