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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user