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

Chrome issue when double click #234

Closed
Seiifer opened this issue May 28, 2015 · 7 comments
Closed

Chrome issue when double click #234

Seiifer opened this issue May 28, 2015 · 7 comments
Assignees
Labels

Comments

@Seiifer
Copy link

Seiifer commented May 28, 2015

HI, thanks for your usefull work.

An invisible rectangle upside the dialog taking all the width is selected in blue with Chrome when we double click on the dialog 'opener'.

For example, with Chrome, in your examples (index.html), if we double click on the link such as 'Plain theme' or most of the others too, this will occur.
On firefox, this will select the contenct of the dialog, which is better, but not ideal neither.

Any idea where this comes from and how to prevent it ?
It looks like it's related to the overlay.

Regards

@egor-smirnov
Copy link
Member

Could you provide example (using service like plunkr) where issue happens?

Without having this it would be hard to find the reason.

@Seiifer
Copy link
Author

Seiifer commented Jun 11, 2015

Using Chrome, just run index.html located in the example folder. Then double click on most of the link opening dialogs.
This doesn't occur when we deactivate the overlay.

@egor-smirnov
Copy link
Member

This is related to selection of this overlay. The simplest solution is to add 'pointer-events: none' to overlay styles.

I've submitted PR fixing this behaviour.

@voronianski
Copy link
Member

@egor-smirnov IE support is lacking - http://caniuse.com/#search=pointer-events

@Seiifer
Copy link
Author

Seiifer commented Jun 11, 2015

From what I tried, this issue did not occur on IE, neither Firefox, it only occured on Chrome, as far as I know.
However, the double click still trigger the selection of a part of the dialog content.

voronianski added a commit that referenced this issue Jun 11, 2015
fix for #234: make overlay non-clickable
@egor-smirnov
Copy link
Member

@voronianski for IE10+ we could use this - https://gist.github.com/egor-smirnov/7b29b7857dc124297b16. For IE10- it's possible to set 'unselectable' attribute, but it have to be done via JS (http://stackoverflow.com/questions/826782/css-rule-to-disable-text-selection-highlighting/4358620#4358620). From my point of view, just adding 'user-select' should be enough. Adding 'unselectable' is maybe over-complication. You thoughts?

@Seiifer I see partial selection issue you mentioned. Going to have a closer look.

@egor-smirnov egor-smirnov self-assigned this Jun 11, 2015
@egor-smirnov
Copy link
Member

As pointer-events:none introduces problems in other parts of system (see #266) I decided to revert it back.

Also I think this issue doesn't make a lot of sense as stuff like this could be always tweaked by user of ngDialog. I changed my opinion and now don't want to be any of the elements non-selectable by default. Let the user of the ngDialog decide whether she / he wants non - selectability or not.

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

No branches or pull requests

3 participants