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

Make text unselectable #61

Merged
merged 3 commits into from
Dec 15, 2017
Merged

Make text unselectable #61

merged 3 commits into from
Dec 15, 2017

Conversation

but0n
Copy link
Contributor

@but0n but0n commented Dec 12, 2017

a little bit enhancement

Copy link
Member

@emackey emackey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @but0n!

style.css Outdated
@@ -5,6 +5,7 @@ html, body {
height: 100%;
background: #222;
overflow: hidden;
user-select: none;
Copy link
Member

@emackey emackey Dec 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little nervous about applying this style to the entire body. Is there nowhere a user might want to select any text? There are some color pickers on the GUI, one could imagine a desire to copy-and-paste color values there. Can we be more selective with how this style is applied?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right.

Actually user-select won't influence input elements, which means user still can select, copy-and-paste values in color picker of control panel, only labels is unselectable, which means the color picker of bottom right is not selectable anymore, that would be a problem.

Seems like we got two choices:

  • Add user-select: text to .pixelPicker
  • Move user-select: none from body to #pbrMath, #inpututs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whichever seems best, just not on the body/html. Thanks!

 - Enable user-select on the body
 - Disable user-select on #pbrMath, #inputs and .dg (Control pannel)
@@ -33,13 +33,18 @@ html, body {
text-align: center;
}

#pbrMath, #inputs, .dg {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is .dg? I don't see it anywhere else.

Copy link
Contributor Author

@but0n but0n Dec 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.dg is control panel

libs/dat.gui.min.js

dg

Copy link
Member

@emackey emackey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@emackey emackey merged commit 629d63c into KhronosGroup:master Dec 15, 2017
emackey pushed a commit that referenced this pull request Mar 3, 2021
update submodule by new master content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants