musiqpad / mqp-server

NodeJS server base for hosting an individual pad
MIT License
30 stars 18 forks source link

[Feature] Allow to select most texts in UI, to allow for clipboard copying. #55

Open Uricorn opened 8 years ago

Uricorn commented 8 years ago

Currently it is not possible to select, and then copy the following texts:

ProditorMagnus commented 8 years ago

The source of this bug is /pads/lib/css/back.css

Specifically

body { margin: 0; padding: 0; background: #0a0a0a; color: #ddd; outline: none; border: none; list-style: none; font: 16px 'Roboto',sans-serif; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

For quick-fix people may use this

var css = document.createElement("style"); css.type = "text/css"; css.innerHTML = "* { -webkit-touch-callout: text !important; -webkit-user-select: text !important; -khtml-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; }"; document.body.appendChild(css);

As user !important is more !important than author !important this will work even if this limitation will be decided to be intentional.

ProditorMagnus commented 8 years ago

https://github.com/musiqpad/mqp-server/pull/60