2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00

UX: avoid suppressing non-click events when dragging the grippie (#33415)

Scopes a check introduced on
https://github.com/discourse/discourse/pull/33046 to `mousedown` events,
it was preventing touch events to be used to drag the grippie.

Reported on
[meta.discourse.org](https://meta.discourse.org/t/composer-resizing-problems-while-using-a-tablet/370706).
This commit is contained in:
Renato Atilio 2025-07-01 15:40:29 -03:00 committed by GitHub
parent bccac3ebfb
commit 818511cc28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ export default class GrippieDragResize extends Modifier {

// Only allow left-click dragging
// c.f. https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button#value
if (event.button !== 0) {
if (event.type === "mousedown" && event.button !== 0) {
return;
}