From c780f13d27a23d21446cc260336cb95dc0ccb38c Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 8 Dec 2014 01:45:32 +0200 Subject: 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 --- res/css/style.css | 3 +++ res/css/style.scss | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'res/css') 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; } + -- cgit v1.3.1