Repository navigation
Conversation
Independent confirmation of the cause, plus a smaller alternativeThanks for this — the diagnosis is correct. I hit the same symptom and independently confirmed the two layers are the cause on DSH desktop with every chrome row ( A note on the keywordThis cost me a few rounds, so it may be worth knowing:
The host already relies on this distinction for inert content in html[data-platform='darwin'] [inert],
html[data-platform='darwin'] [inert] * {
-webkit-app-region: initial;
}so Alternative that avoids touching
|
ysr666
left a comment
There was a problem hiding this comment.
Native macOS confirmation + a smaller alternative for #81
I reproduced this on the actual desktop shell (not only a browser fixture):
- DSH desktop
0.2.1-rc.5, Electron44.7.0, macOS27.0arm64 @changfenhuang/dsh-annotation1.4.10- Live DOM:
[data-annotation-overlay]is a direct child of<body>; with DevTools open its rect was725×820, and its computed-webkit-app-regionwasno-drag. At the sidebar/header probe points it was the last app-region rectangle in DOM order, so it subtracted every[data-window-drag]rectangle below it.
A smaller rule fixes it natively without changing layer geometry or clip-path:
[data-annotation-overlay],
[data-annotation-num-layer],
[data-annotation-for-dsh] {
-webkit-app-region: initial !important;
}-webkit-app-region is not inherited, and the host's interactive-element no-drag rule still applies to buttons/inputs, so annotation clicks are unaffected. On the real DSH desktop this gave 3/3 native drags that moved the window exactly by the pointer delta:
(224,85) → (244,100) → (264,115) → (284,130), size stayed1280×820- Without the rule, the same probe does not move the window.
The advantage over the zero-size shells is that the existing percentage-based clipWithHoles() and its pixel-conversion change are not needed; this also covers both 1.4.11 body layers plus the host in one place.
I also tried dropping the 1.4.11 client bundle from this PR into my 1.4.10 install on DSH 0.2.1-rc.5; the plugin entry failed to import in the web-boot log. That is likely a host/client-version mismatch in my test setup, not a judgment on this PR, so I am not claiming a clean full-DSH native run of #84. A minimal Electron 44.7.0 fixture with this PR's client bundle did show both shells at 0×0 and the 900×52 drag region moving the native window, so the geometry approach itself looks sound.
中文要点:真机 DSH 上实测,给三个 body 直属图层加 -webkit-app-region: initial !important 即可恢复拖拽;3/3 成功,且完全不动 DOM 几何与 clip-path。建议考虑把这条规则并进 #84,或作为更小的替代实现。
Happy to open a small PR against main with this rule plus a regression test if you prefer it over the zero-size shells; otherwise feel free to fold the rule into this PR.
|
One attribution correction to my review above: Fleta14 already proposed the |
Fixes #81.
Cause
DSH
dsh-v0.2.0-rc.2marks every direct child of<body>outside#rootas-webkit-app-region: no-drag. Both annotation layer shells currently fill the viewport, so their native no-drag rectangles cover host drag regions even withpointer-events: none.Verified host source, following the issue investigation.
Change
100%bounds on zero-size shells would collapse the clipping region and hide annotations.No event-capture changes, version bump, release, or host-core modifications.
Verification
npm run check(build, syntax checks, 93 tests).scripts/verify-pack.mjswith a writable npm cache; package contents checked.git diff --check, and independent static review.686608b2bc2269817bad3e8b2387035cdcd174b5: Node 22/24 checks, historical/current Enter and IME integration, browser interaction regressions (including the new window-drag geometry test), package verification, and real DSH Web smoke.Draft pending native macOS acceptance; all CI jobs are green.