[PR #9054] fix(desktop): Added a Windows-only guard that makes window.getComputedStyle fall back to document.documentElement #12968

Closed
opened 2026-02-16 18:17:51 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9054

State: closed
Merged: Yes


What does this PR do?

Fix #9051 and #8666, tested in Windows by built a exe

My seeing error:

TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
TypeError: parameter 1 is not of type 'Element'.
    at getComputedStyle$1 (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:91066)
    at isOverflowElement (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:89839)
    at getOverflowAncestors (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:91733)
    at autoUpdate (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:99252)
    at Object.fn (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:105253)
    at runComputation (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:8250)
    at updateComputation (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:7981)
    at runTop (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:9466)
    at runUserEffects (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:10730)
    at http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:10322
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9054 **State:** closed **Merged:** Yes --- ### What does this PR do? Fix #9051 and #8666, tested in Windows by built a exe My seeing error: ```log TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. TypeError: parameter 1 is not of type 'Element'. at getComputedStyle$1 (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:91066) at isOverflowElement (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:89839) at getOverflowAncestors (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:91733) at autoUpdate (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:99252) at Object.fn (http://tauri.localhost/assets/index-BMEaQ_KQ.js:1707:105253) at runComputation (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:8250) at updateComputation (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:7981) at runTop (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:9466) at runUserEffects (http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:10730) at http://tauri.localhost/assets/index-BMEaQ_KQ.js:2:10322 ```
yindo added the pull-request label 2026-02-16 18:17:51 -05:00
yindo closed this issue 2026-02-16 18:17:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12968