You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error dialog (TypeError: null contentWindow) when rearranging panes on short windows #17954
On windows short enough to trigger pane snap-to-minimize churn (observed at 1024x640; CI-runner-sized displays), rearranging panes -- e.g. swapping quadrants in Global Options > Pane Layout -- can raise an error dialog:
(TypeError) : Cannot read properties of null (reading 'document')
ImageFrame.replaceLocation (the Plots pane's image host) dereferences el.contentWindow unconditionally; while the iframe is detached or being re-parented during the layout change, contentWindow is null and the read throws an uncaught exception. The onLoad path already probes for readiness and retries (its comment even notes "sometimes contentWindow is null"); only the direct setImageUrl path lacked the guard.
Found while pinning the e2e test window geometry to the CI runner's display size: pane_layout.test.ts failed 16/16 -> 15/16 at 1024x640 and the failure screenshots showed this dialog.
Reopening note (for the record -- fix is committed, see below): the ImageFrame guard in #17956 fixed one instance of this "TypeError: Cannot read properties of null (reading 'document')" dialog, but not the only one. AceEditorPreview (the theme preview in Global Options > Appearance) schedules setLineHeight() on a 100ms timer; if the preview iframe is detached before it fires (preferences dialog closed, or a pane relayout reparents it -- more likely on short windows), getDocument() dereferences a null contentWindow and raises the same dialog.
This second instance was caught by the fail-on-client-exception harness added in #17956 (via pane_layout.test.ts at CI window geometry) and fixed in commit 4b30336 on the data-viewer-filter-coverage branch (PR pending): stop the scheduled callback when the widget is detached, and null-check both the window and document in setLineHeight.
Activity
guard ace editor preview against detached frame; restore default tabs…
kevinushey commentedon Jun 12, 2026
Reopening note (for the record -- fix is committed, see below): the ImageFrame guard in #17956 fixed one instance of this "TypeError: Cannot read properties of null (reading 'document')" dialog, but not the only one.
AceEditorPreview(the theme preview in Global Options > Appearance) schedulessetLineHeight()on a 100ms timer; if the preview iframe is detached before it fires (preferences dialog closed, or a pane relayout reparents it -- more likely on short windows),getDocument()dereferences a nullcontentWindowand raises the same dialog.This second instance was caught by the fail-on-client-exception harness added in #17956 (via
pane_layout.test.tsat CI window geometry) and fixed in commit 4b30336 on the data-viewer-filter-coverage branch (PR pending): stop the scheduled callback when the widget is detached, and null-check both the window and document insetLineHeight.add data viewer filter coverage; fix factor restore and stale filter …