We will not do keyboard APZ, even if the event listener is marked passive.

Passive only restricts the use of preventDefault, and we also care about whether
the event listener changes the focus or selection of a page. 

An example where this matters would be a page with a key listener that sets the
focus of the page to a <textarea>. If the user were to hit space twice, they 
would
expect the first space to scroll the page, and the second to be input into the
<textarea>.

With keyboard APZ enabled we can't guarantee that to happen, as the focus
of the page can't be guaranteed to sync to APZ in time for us to know not to
scroll the root scroll frame again.

It's not clear whether this is behaviour that is widely relied on. We're 
attempting
to be conservative in the cases we allow this.

Let me know if the example is unclear.

Thanks,
Ryan

________________________________________
From: Ben Kelly <[email protected]>
Sent: Sunday, July 23, 2017 12:26 PM
To: Ryan Hunt
Cc: [email protected]
Subject: Re: Keyboard APZ has landed on Inbound

On Sat, Jul 22, 2017 at 2:05 AM, Ryan Hunt 
<[email protected]<mailto:[email protected]>> wrote:
Keyboard APZ can't be used in every case. Currently it's disabled in the
presense of key event listeners, as they can preventDefault scrolling and that
is a non-negotiable part of the web.

Do we do keyboard APZ if the event listener is passive:true?
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to