\n
\n \n \ndiff --git a/tests/functional/labels-auth.js b/tests/functional/labels-auth.js
index f4767de8d..ecc7bf257 100644
--- a/tests/functional/labels-auth.js
+++ b/tests/functional/labels-auth.js
@@ -93,6 +93,27 @@ define(
assert.notInclude("is-active", className);
})
.end();
+ },
+
+ "Clicking close button actually closes it?": function() {
+ return FunctionalHelpers.openPage(
+ this,
+ url("/issues/2"),
+ ".js-LabelEditorLauncher",
+ true /* longerTimeout */
+ )
+ .findByCssSelector(".js-LabelEditorLauncher")
+ .click()
+ .end()
+ .findByCssSelector(".js-LabelEditor-close")
+ .click()
+ .end()
+ .findByCssSelector(".js-LabelEditorLauncher")
+ .getAttribute("class")
+ .then(function(className) {
+ assert.notInclude("is-active", className);
+ })
+ .end();
}
};
});
diff --git a/webcompat/static/js/lib/labels.js b/webcompat/static/js/lib/labels.js
index 116a12bdc..899bc605e 100644
--- a/webcompat/static/js/lib/labels.js
+++ b/webcompat/static/js/lib/labels.js
@@ -175,7 +175,7 @@ issues.LabelEditorView = Backbone.View.extend({
this.reRender({ labels: _.uniq(modelUpdate) });
},
closeEditor: function(e) {
- if (!e || (e && e.keyCode === 27)) {
+ if (!e || (e && (e.keyCode === 27 || !e.keyCode))) {
var checked = $("input[type=checkbox]:checked");
var labelsArray = _.pluck(checked, "name");
this.issueView.editorButton.removeClass("is-active");
diff --git a/webcompat/static/js/templates.js b/webcompat/static/js/templates.js
index ba0882dca..6586e62fa 100644
--- a/webcompat/static/js/templates.js
+++ b/webcompat/static/js/templates.js
@@ -28,4 +28,4 @@ this["wcTmpl"]["list-issue/issuelist-sorting.jst"] = function(obj) {obj || (obj
this["wcTmpl"]["web_modules/issue-list.jst"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) { if (issues.length) { ;__p += '\n '; _.each(issues, function(issue) { ;__p += '\n \n
Nothing here currently, go report something!
\n'; } ;}return __p}; -this["wcTmpl"]["web_modules/label-editor.jst"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) {__p += '