Repository navigation
Replies: 2 comments
|
I built a narrow reference implementation for the stranded-tooltip part of this report, based on current
What it changes:
Verified: focused Tooltip/consumer suites, the full GUI suite, typecheck, lint, production web build, the push-time contracts gate, doc-sync (28/28), and the assembled queue-actions browser scenario (3/3). I am not counting the full Windows web-replay run: its fixture baseline also fails on untouched Scope is deliberately limited: this does not claim to solve the rapid-tap zoom half. Target sizing overlaps the public report/work in #4438, while a global |
|
补充现状与一个更轻的规避(0.1.7-rc.2 实测仍在线: 规避(自 rc.1 起自用,10 行 client bundle 插件,至今稳定): // dsh bundle 插件:dsh plugin --profile web add <本目录>,Web 侧栏"插件"页可开关
exports.apply = function (ctx) {
ctx.effect(function () {
var style = document.createElement("style");
style.textContent = "@media (hover: none) and (pointer: coarse){[role=tooltip]{display:none!important}}";
document.head.appendChild(style);
return function () { style.remove(); };
});
};锚点按钮均带 建议(楼主参考实现之外的最小改动,两处独立):
相关同族:#7927(首击被 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On touch devices the web client has three related problems around the sidebar rail controls:
touch-actionrules ship anywhere, so on iOS Safari a quick second tap zooms the page instead of clicking. This reads as "the button didn't work, I had to tap again."Reproduction of the ghost tooltip
Tap the sidebar collapse toggle on an emulated iPhone-class device and sample
[role="tooltip"]visibility over time:The engine difference is exactly why desktop testing misses this. Tracing synthesized events shows why:
Chromium after
click:mouseout/mouseleavefire ~20 ms later because content shifted under the stationary synthetic cursor → the tooltip self-cancels.WebKit after
click: no trailing boundary events at all. The sequence is:Root causes (source refs @ master)
packages/client/ui-primitives/src/Tooltip.tsxonFocuscallsshow()immediately — every tap focuses its target, so a tap is also a "show tooltip now" command.onMouseEnterarmsshowAfterHoverDelay(); on touch there is no real hover intent behind it.onMouseLeave/onBlur. A tap that moves or remounts the anchor (sidebar collapse:.railInentrance animation translates controls 49 px; wide content unmounts after 150 ms) produces no trailingmouseleavein WebKit/iOS — the comment at L103–104 already acknowledges this failure class ("no mouseleave fires") but handles it only for thedisabledprop path.No
touch-actionanywhere.grep -r "touch-action" dist/assets/*.css→ zero matches, whileindex.htmlkeeps the viewport pinch-zoomable. On iOS Safari double-tap-to-zoom therefore stays armed over every control.Touch targets. The collapsed-rail controls are 36×36 (
SidebarRoot.module.css:.iconButton { width: 28px }inside a 36px control box per the ui-sidebar README); the collapse toggle measured 36×36 live.Suggested directions
matchMedia('(hover: hover) and (pointer: fine)')(re-evaluated on change), or at minimum drop the immediateonFocusshow when the last input modality was touch. Tooltips carry no information a keyboard/screen-reader user lacks — the anchors already carryaria-label.touch-actionpolicy in the base theme sheet:button, [role="button"], a[href], input, select, textarea, label { touch-action: manipulation; }— removes both the legacy click delay and zoom-on-second-tap without affecting pinch zoom.Working stopgap (community plugin)
We packaged the CSS-level fixes as an out-of-tree bundle plugin —
@oksure/dsh-client-ui-mobile-comfort— which injects:Verified A/B on the same trace harness: baseline leaves the tooltip visible ≥2.8 s after each tap; with the sheet, every mounted tooltip computes to
display: none.Happy to provide full event traces (JSON), screenshots, or more detail if useful.
All reactions