mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
PR #50646 added a dock state allowlist in SetDockState() that collapsed any non-matching value to "right". WebContents::OpenDevTools passes an empty string when no `mode` option is given, which is the sentinel LoadCompleted() uses to restore `currentDockState` from prefs. The allowlist clobbered that sentinel to "right", so previously-undocked devtools would flash detached and then snap back to the right dock. Preserve the empty string through SetDockState() so the pref-restore path runs; still reject any non-empty invalid value to keep the JS-injection guard from #50646 intact. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>