- Issue created by @alex malik
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
Can you use
git bisect
to find which commit caused this problem? Does it exist in 6.3.x? - πΊπΈUnited States timwood Rockville, Maryland
@liam morland I think I found the commit which caused the problem. In https://www.drupal.org/project/webform/issues/3427966 π Webform Dialog Modal triggered with a link doesn't work on touch device Active
touchstart
was added to the event list withclick
. I briefly tested (but only in my Chrome inspector mobile interface) changing this to remove touchstart and include mouseup, somouseup click
and that seemed to work well in preventing touch scrolling/dragging from accidentally activating the modal webform while still allowing it to work when I actually tap the button. - πΊπΈUnited States timwood Rockville, Maryland
I also tested with the change I described in the previous comment using the XCode simulator with iPhone 16 plus and it works better there as well.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
Please make an issue fork and merge request with your fix.
If you can make an automated test that surfaces this problem, that would be great.
To add my results from π Webform Dialog Modal triggered with a link doesn't work on touch device Active : Instead relying on old mouse events, consider to use 'pointerup' and 'click' (while click is only required to apply preventDefault()).
Here is a Pen to test the events: https://codepen.io/thomas-frobieter/pen/qEdNoEr