Commit a2e5b2e4 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix dropdown menu on Windows-- it uses nw.js 0.14.7 which didn't include the...

fix dropdown menu on Windows-- it uses nw.js 0.14.7 which didn't include the "forEach" method for DOM nodelists
parent 5a5e4b38
......@@ -554,10 +554,12 @@ function ok() {
function change_width_and_height_labels() {
[".mknob_steps", ".mknob_size"].forEach(function(sel) {
document.body.querySelectorAll(sel).forEach(function(e) {
Array.prototype.forEach.call(
document.body.querySelectorAll(sel), function(e) {
e.setAttribute("data-i18n", "iem.prop" + sel);
});
document.body.querySelectorAll(sel + "_tt").forEach(function(e) {
Array.prototype.forEach.call(
document.body.querySelectorAll(sel + "_tt"), function(e) {
e.setAttribute("data-i18n", "[title]iem.prop" + sel + "_tt");
});
});
......
......@@ -498,7 +498,7 @@ var canvas_events = (function() {
&& evt.target.parentNode.parentNode
&& evt.target.parentNode.parentNode.id === "dropdown_list") {
li_array = evt.target.parentNode.querySelectorAll('li');
li_array.forEach(function(e) {
Array.prototype.forEach.call(li_array, function(e) {
e.classList.remove("highlighted");
});
evt.target.classList.add("highlighted");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment