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
- π¨π¦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.
- πΊπΈ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.
- πΊπΈ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.