Allow toggling the column selector with a keyboard
Using a button tag, it's possible for every user to "click" the element. Besides, we don't need to call the `preventDefault` function, because buttons with type "button" don't do anything by default.
This commit is contained in:
@@ -33,8 +33,7 @@
|
||||
$("#js-columns-selector-wrapper").append(item);
|
||||
});
|
||||
},
|
||||
toggleOptions: function(event) {
|
||||
event.preventDefault();
|
||||
toggleOptions: function() {
|
||||
$("#js-columns-selector").toggleClass("hollow");
|
||||
$("#js-columns-selector-wrapper").toggleClass("hidden");
|
||||
},
|
||||
@@ -73,8 +72,8 @@
|
||||
App.ColumnsSelector.initChecks();
|
||||
App.ColumnsSelector.initColumns();
|
||||
$("#js-columns-selector").on({
|
||||
click: function(event) {
|
||||
App.ColumnsSelector.toggleOptions(event);
|
||||
click: function() {
|
||||
App.ColumnsSelector.toggleOptions();
|
||||
}
|
||||
});
|
||||
$(".column-selector-item input").on({
|
||||
|
||||
Reference in New Issue
Block a user