Reputation: 151
How to achieve opportunity copy content from popup-open?
In OpenLayers-2 I could select part of content popup and copy it.
In OL-3 miss this option.
Popup-open has disable default option select content from popup.
Upvotes: 0
Views: 342
Reputation: 380
I think this is related to this issue: https://github.com/openlayers/openlayers/issues/6720
However I think setting user-select: auto
for the .ol-selectable
class doesn't have the desired effect as according to the spec the value of auto
will results in none
if the computed value of user-select
on the parent of this element is none
, which it is in OpenLayers due to user-select
being set on the .ol-viewport
.
Try adding this CSS to your page after the OpenLayers CSS is loaded:
.ol-selectable {
-webkit-touch-callout: text;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
Upvotes: 2