demo · v142
Sticky user activation
Click anywhere on the page to grant a user-activation bit. Watch navigator.userActivation.hasBeenActive flip to true. The right column shows what Chrome 142 keeps and Chrome 141 drops when you navigate same-origin.
navigator.userActivation.hasBeenActive
false
navigator.userActivation.isActive
false
Chrome ≤ 141 (old)
1. user clicks · activation = true
2. renderer navigates same-origin
3. new doc loads · activation reset to FALSE
4. autofocus / vibrate / virtual-keyboard → blocked
Chrome 142+
1. user clicks · activation = true
2. renderer navigates same-origin
3. new doc loads · sticky activation PRESERVED
4. autofocus / vibrate / virtual-keyboard → still allowed
relevant API
document.addEventListener("click", () => {
// navigator.userActivation.hasBeenActive is now true
// In Chrome 142+ it remains true across same-origin
// renderer-initiated navigations (location.href = …, link clicks).
location.href = "/next";
});
see also
- Sticky user activation — feature index
- ChromeStatus entry