U4-6214 - ng-swipe-left/ng-swipe-right blocks text selection in angular menu items

Created by Matt Brailsford 30 Jan 2015, 13:25:58 Updated by Arjan Woldring 07 Mar 2018, 09:59:36

I'm creating a custom angular (not iframed) menu item dialog which contains a text area. When I try to make a selection in the textarea, this gets blocked by the ng-swipe-left/ng-swipe-right events registered on the containing element.

Maybe the ng-swipe-left/ng-swipe-right events should only be set to fire if the event is triggered on anything other than an input field?


Shannon Deminick 26 Jun 2017, 06:50:58

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Ronald Barendse 05 Feb 2018, 20:58:41

This is still an issue, especially on dialogs that require more input than just some clicks (like adding new products in Merchello).

Checking the difference between swiping and selecting text will be quite hard/not very predictable. This could be done by storing the active element on touchstart/mousedown and if it's an input/textarea, make sure the swipe event is cancelled. Another approach could be checking if any text is selected on the swipe event, but maybe some browsers only report the selected text after the selection is done (that should at least be tested)...

A great addition would be to add an option/parameter to the dialog service to opt-out of this behavior altogether!

Ronald Barendse 05 Feb 2018, 21:06:12

Looks like the ngTouch component is used in Umbraco and this will be depreciated in Angular 1.7.0: https://github.com/angular/angular.js/issues/4090. In newer Angular versions it's also a possibility to disable these events on mouse events with ng-swipe-disable-mouse (and only fire swipe events on touch)...

Arjan Woldring 07 Mar 2018, 09:59:36

This is indeed an annoying issue. Is there a way to disable this left-swipe event?

Also posted here: https://our.umbraco.org/forum/developing-packages/90502-issues-when-using-the-navigation-and-dialogservice-in-custom-package

Priority: Normal

Type: Bug

State: Reopened


Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.2.1

Due in version:


Story Points: