Webform Dialog Modal triggered with a link doesn't work on touch device

Created on 14 March 2024, 4 months ago
Updated 22 April 2024, 2 months ago

Problem/Motivation

When adding a link to a webform dialog the dialog modal is not working on a touch device. Instead of opening the modal, it follows the link.

Steps to reproduce

Create a link like the following:
<a href="/en/form/testform?source_entity_type=ENTITY_TYPE&amp;source_entity_id=ENTITY_ID" class="webform-dialog" data-dialog-options="{&quot;width&quot;:800}">Open Webform Dialog</a>
and click on it - it should open a dialog like on desktop-devices, but it follows the link on touch-devices. This is also happening in the inspector with touch-simulation enabled.

Proposed resolution

Add touchstart event in webform.dialog.js @ line 83. Change from click to touchstart click

πŸ› Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria roromedia Linz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024