web: the histogram waits to be asked for, the phone's ruler is a finger tall, and its x answers a real press — a 22px strip under a 44px thumb, a histogram that opened over the photo, and a close button whose press the drag's own preventDefault ate

This commit is contained in:
2026-10-01 09:00:56 +07:00
parent 31435aac77
commit fd330c05e0
3 changed files with 17 additions and 4 deletions
+4
View File
@@ -250,6 +250,10 @@ export function Histogram({ url, onClose }: { url: string; onClose: () => void }
const start = (e: React.PointerEvent<HTMLDivElement>) => {
if (e.button !== 0) return;
// The × sits in this head but is a button, not a grip: preventDefault here
// swallows the click that follows the press (measured — a real click on it
// did nothing, while el.click() worked), so the press is left to it.
if ((e.target as HTMLElement).closest('.hist-close')) return;
e.preventDefault();
e.stopPropagation();
e.currentTarget.setPointerCapture(e.pointerId);