Skip to content

Commit

Permalink
Make certain controls non-selectable / non-draggable (FreeTubeApp#3947)
Browse files Browse the repository at this point in the history
* Make settings heading text unselectable

I often encounter the issue of accidentally selecting/highlighting the settings heading text, which ends up highlighting all of the text inside of that settings tab. This is an unpleasant appearance that I have to click to remove. This change removes this issue altogether.

* Switch all instances of user-select to be only user-select and -webkit-user-select

* Make side-nav labels unselectable

* Make side-nav and channels un-draggable

* Remove selection from ft-flex-box, ft-input placeholders, and profile icons
  • Loading branch information
kommunarr committed Aug 27, 2023
1 parent 08f8b27 commit 665da2c
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/renderer/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

.flexBox {
display: block;
user-select: all;
-webkit-user-select: all;
}

#changeLogText {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/ft-flex-box/ft-flex-box.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
user-select: none;
-webkit-user-select: none;
}
3 changes: 3 additions & 0 deletions src/renderer/components/ft-icon-button/ft-icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
flex-flow: row wrap;
justify-content: space-evenly;
position: relative;

-webkit-user-select: none;
user-select: none;
}

Expand Down Expand Up @@ -84,6 +86,7 @@
list-style-type: none;
position: absolute;
text-align: center;
-webkit-user-select: none;
user-select: none;
z-index: 3;

Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/ft-input/ft-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@

.ft-input-component ::-webkit-input-placeholder {
color: var(--tertiary-text-color);
user-select: none;
-webkit-user-select: none;
}

.forceTextColor .ft-input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
line-height: 1em;
text-align: center;
padding: 17.5px 0;
user-select: none;
-webkit-user-select: none;
}

.profileName {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/ft-profile-edit/ft-profile-edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
line-height: 1em;
text-align: center;
padding: 25px 0;
user-select: none;
-webkit-user-select: none;
}

@media only screen and (max-width: 680px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
font-size: 20px;
line-height: 1em;
text-align: center;
user-select: none;
-webkit-user-select: none;
}

.profileList {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pure-checkbox input[type="checkbox"], .pure-radiobutton input[type="checkbox"],
position: relative;
padding-left: 2em;
vertical-align: middle;
-webkit-user-select: none;
user-select: none;
cursor: pointer;
display: block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
}

.sectionTitle {
-webkit-user-select: none;
user-select: none;
margin-left: 2%;
}

Expand Down
3 changes: 3 additions & 0 deletions src/renderer/components/side-nav/side-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
transition-property: width;
transition-duration: 150ms;
transition-timing-function: ease-in-out;
user-select: none;
-webkit-user-select: none;
}

.inner {
Expand Down Expand Up @@ -41,6 +43,7 @@
position: relative;
padding: 5px;
min-height: 35px;
-webkit-user-drag: none;
}

.moreOption {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/top-nav/top-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
color: gray;
opacity: 0.5;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
}

Expand Down
11 changes: 2 additions & 9 deletions src/renderer/videoJS.css
Original file line number Diff line number Diff line change
Expand Up @@ -1090,17 +1090,10 @@ body.vjs-full-window {
cursor: pointer;
padding: 0;
margin: 0 0.45em 0 0.45em;
/* iOS Safari */
-webkit-touch-callout: none;
/* Safari */

-webkit-user-select: none;
/* Konqueror HTML */
/* Firefox */
-moz-user-select: none;
/* Internet Explorer/Edge */
-ms-user-select: none;
/* Non-prefixed version, currently supported by Chrome and Opera */
user-select: none;

background-color: #73859f;
background-color: rgba(115, 133, 159, 0.5);
}
Expand Down

0 comments on commit 665da2c

Please sign in to comment.