From 0b93cf858c2293e79fae98d43314d85e5726e176 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Fri, 17 Oct 2025 14:45:43 +0800 Subject: [PATCH] Add hidden document monitoring in parallel orientation lock steps The 'apply orientation lock' algorithm monitors if documents stop being fully active during parallel execution, but was missing equivalent monitoring for document visibility state changes. This creates inconsistency where: - Common safety checks prevent hidden documents from starting locks - Parallel steps monitor fully-active state changes - But parallel steps don't monitor hidden state changes This fix adds monitoring for documents becoming hidden during parallel orientation lock processing, with consistent AbortError rejection. Fixes #256 --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index 5b5f19c..ed4a6e9 100644 --- a/index.html +++ b/index.html @@ -694,6 +694,11 @@

not `null`, [=reject and nullify the current lock promise=] of |document| with an {{"AbortError"}} and abort these steps. +
  • If |document|'s [=Document/visibility state=] becomes "hidden", and + if the |document|'s {{Document/[[orientationPendingPromise]]}} is + not `null`, [=reject and nullify the current lock promise=] of + |document| with an {{"AbortError"}} and abort these steps. +
  • If |orientation| is `null`, [=unlock the screen orientation=].
  • Otherwise, attempt to [=lock the screen orientation=] to