SVG icon fixup: invoke onclick() directly

This commit is contained in:
tophf 2017-04-01 07:36:12 +03:00
parent 3c5cc141c4
commit 67e606c3d5

View File

@ -1422,7 +1422,7 @@ function fromMozillaFormat() {
function doImport() {
var replaceOldStyle = this.name == "import-replace";
popup.querySelector(".dismiss").click();
popup.querySelector(".dismiss").onclick();
var mozStyle = trimNewLines(popup.codebox.getValue());
var parser = new parserlib.css.Parser(), lines = mozStyle.split("\n");
var sectionStack = [{code: "", start: {line: 1, col: 1}}];
@ -1766,7 +1766,7 @@ function showHelp(title, text) {
return div;
function closeHelp(e) {
if (e.type == "click" || (e.keyCode == 27 && !e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey)) {
if (!e || e.type == "click" || (e.keyCode == 27 && !e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey)) {
div.style.display = "";
document.querySelector(".contents").innerHTML = "";
document.removeEventListener("keydown", closeHelp);