mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Workaround firefox not allowing SVG elements to have focus
This commit is contained in:
parent
59a7c46482
commit
8d4be848b0
@ -74,7 +74,6 @@ RED.view = (function() {
|
|||||||
.append("svg:svg")
|
.append("svg:svg")
|
||||||
.attr("width", space_width)
|
.attr("width", space_width)
|
||||||
.attr("height", space_height)
|
.attr("height", space_height)
|
||||||
.attr("tabindex",1)
|
|
||||||
.attr("pointer-events", "all")
|
.attr("pointer-events", "all")
|
||||||
.style("cursor","crosshair")
|
.style("cursor","crosshair")
|
||||||
.on("mousedown", function() {
|
.on("mousedown", function() {
|
||||||
@ -2150,7 +2149,7 @@ RED.view = (function() {
|
|||||||
function focusView() {
|
function focusView() {
|
||||||
var scrollX = window.parent.window.scrollX;
|
var scrollX = window.parent.window.scrollX;
|
||||||
var scrollY = window.parent.window.scrollY;
|
var scrollY = window.parent.window.scrollY;
|
||||||
$("#chart svg").focus();
|
$("#chart").focus();
|
||||||
window.parent.window.scrollTo(scrollX,scrollY);
|
window.parent.window.scrollTo(scrollX,scrollY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
transition: right 0.2s ease;
|
transition: right 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chart svg:focus {
|
#chart:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
<div id="workspace">
|
<div id="workspace">
|
||||||
<ul id="workspace-tabs"></ul>
|
<ul id="workspace-tabs"></ul>
|
||||||
<div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="fa fa-plus"></i></a></div>
|
<div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="fa fa-plus"></i></a></div>
|
||||||
<div id="chart"></div>
|
<div id="chart" tabindex="1"></div>
|
||||||
<div id="workspace-toolbar"></div>
|
<div id="workspace-toolbar"></div>
|
||||||
<div id="workspace-footer">
|
<div id="workspace-footer">
|
||||||
<a class="workspace-footer-button" id="btn-zoom-out" href="#"><i class="fa fa-minus"></i></a>
|
<a class="workspace-footer-button" id="btn-zoom-out" href="#"><i class="fa fa-minus"></i></a>
|
||||||
|
Loading…
Reference in New Issue
Block a user