compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Unable to preventDefault inside passive event listener due to target being treated as passive

Open NickGeek opened this issue 4 years ago • 1 comments

Quick Summary: When scrolling after hitting the bottom or top of the page with the Elm debugger open Chrome will log the following message to the console:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
See https://www.chromestatus.com/features/6662647093133312

It is coming from the preventDefault in this code:

function _Debugger_blocker(event)
{
	if (event.type === 'keydown' && event.metaKey && event.which === 82)
	{
		return;
	}

	var isScroll = event.type === 'scroll' || event.type === 'wheel';
	for (var node = event.target; node; node = node.parentNode)
	{
		if (isScroll ? node.id === 'elm-debugger-details' : node.id === 'elm-debugger-overlay')
		{
			return;
		}
	}

	event.stopPropagation();
	event.preventDefault();
}

SSCCE

  • Any Elm document app in debug mode

  • Keep scrolling after hitting the top or bottom of the web page

  • Elm: 0.19.1

  • Browser: 88.0.4324.182

  • Operating System: Linux

NickGeek avatar Mar 07 '21 09:03 NickGeek

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

github-actions[bot] avatar Mar 07 '21 09:03 github-actions[bot]