diff --git a/html/force.js b/html/force.js index b29bf7c..56a3f15 100644 --- a/html/force.js +++ b/html/force.js @@ -5,13 +5,15 @@ function switch_style(s) { for (var i = 0; i < el.length; i++ ) { if (el[i].getAttribute("rel").indexOf("style") != -1 && el[i].getAttribute("title")) { - if (el[i].getAttribute("title") == s) { - style_btn.text(s) + /* always set to true first to workaround Chrome bug */ + el[i].disabled = true + + if (el[i].getAttribute("title") == s) el[i].disabled = false - } else - el[i].disabled = true } } + + style_btn.text(s) } function getOffset( el ) { diff --git a/html/nodes.html b/html/nodes.html index ebf204e..e91eccf 100644 --- a/html/nodes.html +++ b/html/nodes.html @@ -5,7 +5,7 @@