yishn / tikzcd-editor

A simple visual editor for creating commutative diagrams.
https://tikzcd.yichuanshen.de/
MIT License
1.86k stars 101 forks source link

Unnecessary selections #14

Closed ozguncagri closed 6 years ago

ozguncagri commented 6 years ago

Sometimes drag operations makes you select unnecessary things on editor. It can be prevent with user-select: none kind of style for better user experience. A picture is worth a thousand words;

screen shot 2017-11-04 at 03 15 12

Thanks for editor BTW :)

yishn commented 6 years ago

Thank you! That's odd, I already have a user-select rule:

https://github.com/yishn/tikzcd-editor/blob/abab9db98439736d4294606d905c20f96fe345ff/css/master.css#L5-L6

Which browser are you using? Maybe we need to add more vendor-specific CSS...

ozguncagri commented 6 years ago

Maybe you should add another rule with -webkit prefix. Because I was trying it on Safari 11.0.1. I found this cross-browser solution on stack-overflow;

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}