Originally commented somewhere around bug 1235632 comment #6 ... We notice a lag in hiding the carets during zoom/scroll, especially while zooming up and to the left (carets move opposite, down and to the right) , and wonder if this can be tightened up / reduced.  https://www.dropbox.com/s/xi2dvkf3q0j0ydv/accessibleCarets_delayHide.mp4?dl=0
AccessibleCaretEventHub implements nsIScrollObserver::AsyncPanZoomStarted() at  to get notified when the zooming started to hide the carets. I don't know if this function can be called earlier during zooming. Perhaps kats will know more.  https://dxr.mozilla.org/mozilla-central/source/layout/base/AccessibleCaretEventHub.cpp?from=AccessibleCaretEventHub.cpp#661
(In reply to Ting-Yu Lin [:TYLin] (UTC+8) from comment #1) > AccessibleCaretEventHub implements nsIScrollObserver::AsyncPanZoomStarted() > at  to get notified when the zooming started to hide the carets. I don't > know if this function can be called earlier during zooming. Perhaps kats > will know more. I don't think it can really get called any earlier the way it's structured now. The call happens in the compositor as soon as the zooming starts, but it can take some time for that call to propagate over IPC and get run on the main thread. During that time the APZC will continue with the zoom. I think the only way to guarantee this is to somehow annotate the layers so that we can show/hide them directly on the compositor thread.
(In reply to Kartikaya Gupta (email:email@example.com) from comment #2) > the only way to guarantee this is by this I mean "the only way to guarantee no delay"
I test this today on Sony Z3C. On release build, I do see the caret fly away while zoom in or out, but I need to pay attention to notice that. So it's probably OK for me. However, on debug build, it's noticeable and intolerable for me. I was wondering which build did the original reporter use.
Nexus 9 on Nightly (so no debug build). Pretty sure page complexity and resolution also factor in. If it shows on a debug build for you it just means it's going to be visible on anything that's not a high end device.
With bug 1249201 landed, the carets are always shown during scrolling or zooming. This is no longer an issue.