Umbraco-cms: Selecting text in context menu closes the dialog

Created on 10 Mar 2019  Â·  10Comments  Â·  Source: umbraco/Umbraco-CMS

When you select text in the context menu (do a swipe left with your mouse) the dialog closes. It is especially annoying when using Umbraco Cloud, and you get a deploy error and want to copy the error message. The dialog then closes, and the error message is gone, and you have to wait for another deploy/restore.

The "functionality" is caused by the ng-swipe-left directive on the dialog. I think the annoyance from the feature overweighs the benefits of being able to swipe left on mobile to close the dialog and the directive should just be removed.

categorux releas7.15.5 typbug

All 10 comments

@madsrasmussen I have noticed this as well. I think ng-swipe only simulate swipe event, so I doesn't distinguish between touch swipe and cursor selecting text (with a tolerance at some specified pixels).

It has previous been suggested to use Hammer.js https://hammerjs.github.io/ in this PR https://github.com/umbraco/Umbraco-CMS/pull/2819

Not sure how many places in the backoffice swipe events are used.

For AngularJS it seems there have been a discussion about it here: https://github.com/angular/angular.js/issues/6626 and implemented so adding ng-swipe-disable-mouse to the ng-swipe-left or ng-swipe-right.

https://docs.angularjs.org/api/ngTouch/directive/ngSwipeLeft

Not sure if the plugin has been updated in v8, otherwise it might be possible to use the latest version, without breaking stuff.

Same issue in V8 a good place where you can see this is in the culture and hostnames dialog

suggested test case on Umbraco 7.14+ and 8.0+: please check this issue is resolved for the UmbracoMultiUrlPicker dialog

I notice on many dialogs, that if the mouse-up is outside the right hand side pane then it closes, but if the mouse-up is inside the right hand side pane it doesn’t.

Is this two separate issues? mouse up outside the right hand side pane vs an issue with swipe left? Should this ticket: https://github.com/umbraco/Umbraco-CMS/issues/5132 be reopened as it seems to refer to the mouse-up issue, and this ticket refers to the swipe left issue?

I am also suffering from this dialog problem in many umbracoDialog/umb-pane from Umbraco 7.12 to 7.15.1.
p.s. iframe dialogs ("Culture and Hostname", "Sort", etc.) are not affected.

The problem can be reproduced by
case 1: selecting any blank area in many different dialogs 1-2 times. OR
case 2: text selection, mouse-down to select text in textbox but mouse-up outside the dialog.

Thanks everyone for the feedback! At the moment we're looking for someone who would like to get their hands dirty, find the source of the problem and try to fix it. Who's game? :-)

I think there are two separate things here. First, ng-swipe in 7.x. Hopefully that's easily addressed with ng-swipe-disable-mouse.

Second, in both 7.x and 8.x, a mouse-up outside the dialog looks like a click outside the dialog, and therefore closes it. This is trickier, I'm not sure how we tell "real" clicks from the end of an overenthusiastic text selection.

Why not change it from click to mouse-down outside the pane to close it?

On Sat, 17 Aug 2019 at 4:39 AM, stevemegson notifications@github.com
wrote:

I think there are two separate things here. First, ng-swipe in 7.x.
Hopefully that's easily addressed with ng-swipe-disable-mouse.

Second, in both 7.x and 8.x, a mouse-up outside the dialog looks like a
click outside the dialog, and therefore closes it. This is trickier, I'm
not sure how we tell "real" clicks from the end of an overenthusiastic text
selection.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/umbraco/Umbraco-CMS/issues/4934?email_source=notifications&email_token=AACWTWOBPV4MDWIUB7H3QZLQE3J3ZA5CNFSM4G45JWYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4PDI5Y#issuecomment-522073207,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACWTWPBR2ET7OWI6IAVQY3QE3J3ZANCNFSM4G45JWYA
.

This is fixed for v7 in https://github.com/umbraco/Umbraco-CMS/pull/6204 - will be part of 7.15.5. There's a small caveat:

The one thing it unfortunately doesn't seem to fix for me is when you drag outside of a dialog and release the mouse button, then it still closes the dialog.

That is not a problem in v8, only in v7.

Was this page helpful?
0 / 5 - 0 ratings