diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-08 01:45:32 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-08 01:45:32 +0200 |
| commit | c780f13d27a23d21446cc260336cb95dc0ccb38c (patch) | |
| tree | 752681b3791adb7e10ea08f95ca434a344dfb4f5 | |
| parent | be3f3931c61561f53c537da1d0d84f3616a24c3c (diff) | |
Prevent text selection in svg (graph)
Not sure this [1] bug is the problem, but we don't want svg selection, and since
editing svg nodes inline is done with an input foreign element, this doesn't
affect selecting there!
[1] http://stackoverflow.com/questions/18124820/html5-svg-text-selection-bug-in-chrome
| -rw-r--r-- | res/css/style.css | 3 | ||||
| -rw-r--r-- | res/css/style.scss | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/res/css/style.css b/res/css/style.css index e1a4ceb1..155d4f25 100644 --- a/res/css/style.css +++ b/res/css/style.css @@ -686,3 +686,6 @@ h2 { h1 { font-size: 12px; } + +svg text::selection { + background: none; } diff --git a/res/css/style.scss b/res/css/style.scss index 9deb7798..9e6ab2d2 100644 --- a/res/css/style.scss +++ b/res/css/style.scss @@ -19,4 +19,13 @@ @import "partials/typography"; // Third-party -@import "vendor/ui.css";
\ No newline at end of file +@import "vendor/ui.css"; + +// Hacks + +// Not sure this bug is the problem, but we don't want svg selection, and since +// editing svg nodes inline is done with an input foreign element, this doesn't +// affect selecting there! +// See http://stackoverflow.com/questions/18124820/html5-svg-text-selection-bug-in-chrome +svg text::selection { background: none; } + |
