Skip to content

Commit

Permalink
Set user-select: text for .ol-selectable
Browse files Browse the repository at this point in the history
In order to allow a user to select content within an element with the `.ol-selectable` class the `user-select` CSS property should be `text`. 

The current value of `auto` results in a computed value of `none` due to the rule `.ol-viewport, .ol-unselectable` specifying `user-select: none`. According to the [the specification](https://www.w3.org/TR/css-ui-4/#valdef-user-select-auto):

> if the computed value of `user-select` on the parent of this element is `none`, the computed value is `none`

Tested manually on Chromium, Firefox and IE11.
  • Loading branch information
walkermatt authored Mar 26, 2018
1 parent 423326f commit caa4a05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions css/ol.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
}
.ol-selectable {
-webkit-touch-callout: default;
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.ol-grabbing {
cursor: -webkit-grabbing;
Expand Down

0 comments on commit caa4a05

Please sign in to comment.