From 8d4be848b0f9d248ad2d3bec385d019426da1bec Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 22 May 2016 21:23:30 +0100 Subject: [PATCH] Workaround firefox not allowing SVG elements to have focus --- editor/js/ui/view.js | 3 +-- editor/sass/workspace.scss | 2 +- editor/templates/index.mst | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/editor/js/ui/view.js b/editor/js/ui/view.js index 8f37d5d3a..130c6226d 100644 --- a/editor/js/ui/view.js +++ b/editor/js/ui/view.js @@ -74,7 +74,6 @@ RED.view = (function() { .append("svg:svg") .attr("width", space_width) .attr("height", space_height) - .attr("tabindex",1) .attr("pointer-events", "all") .style("cursor","crosshair") .on("mousedown", function() { @@ -2150,7 +2149,7 @@ RED.view = (function() { function focusView() { var scrollX = window.parent.window.scrollX; var scrollY = window.parent.window.scrollY; - $("#chart svg").focus(); + $("#chart").focus(); window.parent.window.scrollTo(scrollX,scrollY); } diff --git a/editor/sass/workspace.scss b/editor/sass/workspace.scss index ac0ef65b3..7f28ed210 100644 --- a/editor/sass/workspace.scss +++ b/editor/sass/workspace.scss @@ -27,7 +27,7 @@ transition: right 0.2s ease; } -#chart svg:focus { +#chart:focus { outline: none; } diff --git a/editor/templates/index.mst b/editor/templates/index.mst index da94c52c6..549110160 100644 --- a/editor/templates/index.mst +++ b/editor/templates/index.mst @@ -58,7 +58,7 @@
-
+