New issue
Advanced search Search tips

Issue 897650 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

First Input Event Timing data sometimes missing

Project Member Reported by tdres...@chromium.org, Oct 22

Issue description

Repro:
1. Dispatch a mouse move event which takes > 50ms.
2. Dispatch a click event.

I expect to see an event timing entry for the mousemove, and then a first event entry for the click.

The first event entry is missing.
 
How are you detecting the first event entry? Currently we are only buffering first event entries that occur before onload (same behavior as other event entries) so my guess is that you're doing getEntriesByType? If you use a PerformanceObserver, does the first event show up?
This is with a PO registered immediately.

I suspect that the code to prevent us from firing first-input multiple times is broken.
Labels: Needs-Feedback
Please provide a sample testcase. I tried the following and it works as expected:

<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Mousemove then click</title>
<body>
<p><a href="http://developer.mozilla.org/" id="mousy">Move your mouse here&hellip;</a></p>
<div id="bla" onclick="performance.now();">ClickME</div>
<script>
const observer = new PerformanceObserver(
  function(entryList) {
    entryList.getEntries().forEach(entry => {
      console.log(entry.entryType);
    });
  });
observer.observe({entryTypes: ['firstInput', 'event']});
document.getElementById("mousy").onmousemove = () => {
  let p = performance.now();
  while(performance.now() < p + 100) {}
}
</script>
</body>

Status: WontFix (was: Assigned)
Discussed with Tim in person, it seems this is working as intended. The explainer may need to be updated to allow not producing first input events when there are no event handlers.

Sign in to add a comment