Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting text in context menu closes the dialog #4934

Closed
madsrasmussen opened this issue Mar 10, 2019 · 10 comments
Closed

Selecting text in context menu closes the dialog #4934

madsrasmussen opened this issue Mar 10, 2019 · 10 comments
Assignees

Comments

@madsrasmussen
Copy link
Contributor

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.

@bjarnef
Copy link
Contributor

bjarnef commented Mar 14, 2019

@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 #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: angular/angular.js#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.

@Migaroez
Copy link
Contributor

Migaroez commented Apr 3, 2019

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

@shearer3000
Copy link

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

@Myster
Copy link
Contributor

Myster commented Apr 5, 2019

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.

@mjbarlow
Copy link
Contributor

Is this two separate issues? mouse up outside the right hand side pane vs an issue with swipe left? Should this ticket: #5132 be reopened as it seems to refer to the mouse-up issue, and this ticket refers to the swipe left issue?

@joecklau
Copy link

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.

@nul800sebastiaan
Copy link
Member

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? :-)

@stevemegson
Copy link
Contributor

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.

@Myster
Copy link
Contributor

Myster commented Aug 17, 2019 via email

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented May 4, 2020

This is fixed for v7 in #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests