This commit is contained in:
gorhill 2016-03-05 23:38:23 -05:00
parent 037bdca6d6
commit c91c91f2dc
1 changed files with 12 additions and 1 deletions

View File

@ -174,6 +174,16 @@ var onInputChanged = function(ev) {
/******************************************************************************/ /******************************************************************************/
// Workaround for:
// https://github.com/gorhill/uBlock/issues/1448
var onPreventDefault = function(ev) {
ev.target.focus();
ev.preventDefault();
};
/******************************************************************************/
// TODO: use data-* to declare simple settings // TODO: use data-* to declare simple settings
var onUserSettingsReceived = function(details) { var onUserSettingsReceived = function(details) {
@ -193,7 +203,8 @@ var onUserSettingsReceived = function(details) {
uDom('[data-setting-type="input"]').forEach(function(uNode) { uDom('[data-setting-type="input"]').forEach(function(uNode) {
uNode.val(details[uNode.attr('data-setting-name')]) uNode.val(details[uNode.attr('data-setting-name')])
.on('change', onInputChanged); .on('change', onInputChanged)
.on('click', onPreventDefault);
}); });
uDom('#export').on('click', exportToFile); uDom('#export').on('click', exportToFile);