Subscribe on changes!

Event Modifiers are not passed when using Render Function

avatar
Feb 20th 2023

Vue version

3.2.47

Link to minimal reproduction

https://stackblitz.com/edit/vue-zh7ajy

Steps to reproduce

Minimal Repro

return () => {
  return h('div', {
    onWheel: withModifiers((e) => console.log("I am not passive", e), ['passive']),
  });
};
  1. Create component using render function
  2. Add event listener with modifier you expect to be passed as options to addEventListener
  3. Verify:
  • by setting breakpoint inside patchEvent
  • or by running Lighthouse report

image

image

What is expected?

I would expect that passive will be passed for options when addEventHandler is executed.

What is actually happening?

Event handler is not passive. It works only for regular templates.

System Info

No response

Any additional comments?

No response

avatar
Feb 20th 2023

Oh... am I see, we are expected to concatenate passive with onWheel. If only I read the docs more carefully :)