> Just curious, is there data about how often this happens? Does it affect
> to key event listeners added to the document only, or do we disable this
> also for other event listeners in any element?

I'm not aware of any data on this. From my testing, it can be quite common.

We disable this when there are keydown, keypress, keyup listeners that would
be triggered by a key event. So when nothing is focused we check for listeners
on the document. If the focus is on an element, we check for key listeners up to
and on the element.

> Also, I assume this affects only to keypress events? Or also to other
> kind of key events?

This affects the other kinds of key events too.

For keyboard APZ we need to track the focus/selection of a page in order to
know what frame to scroll. This can change at any moment from JS. Either
in response to user input with event listeners, or at any other moment in
setTimeout or rAF.

We made the decision to be conservative and respect
synchronous changes in response to user input, but not from setTimeout
and rAF. So to do this we need to use the synchronous code path when
there are key event listeners.

> Also, is bug 1352654 the right tracking bug? Doesn't seem related at a
> glance.

Whoops, the correct tracking bug is bug 1376525. Copied the wrong one.
________________________________________
From: dev-platform <dev-platform-bounces+rhunt=eqrion....@lists.mozilla.org> on 
behalf of Emilio Cobos Álvarez <emi...@crisal.io>
Sent: Saturday, July 22, 2017 12:43:31 PM
To: Ryan Hunt; dev-platform@lists.mozilla.org
Subject: Re: Keyboard APZ has landed on Inbound

On 07/22/2017 08:05 AM, Ryan Hunt 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.

Just curious, is there data about how often this happens? Does it affect
to key event listeners added to the document only, or do we disable this
also for other event listeners in any element?

Also, I assume this affects only to keypress events? Or also to other
kind of key events?

I would expect quite a few pages to use them...

> There may be issues with this enabled. Please test this out, and if you find
> any regressions please file bugs blocking bug 1352654.

Also, is bug 1352654 the right tracking bug? Doesn't seem related at a
glance.

 -- Emilio
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to