Refocus textbox after save/reset

This commit is contained in:
Rob Garrison 2017-08-26 10:46:04 -05:00
parent e96f0808ed
commit 1a384142ba

View File

@ -307,6 +307,7 @@ function setupLinterSettingsEvents(popup) {
} else { } else {
showLinterErrorMessage(linter, t('setLinterError')); showLinterErrorMessage(linter, t('setLinterError'));
} }
popup.codebox.focus();
}); });
$('.reset', popup).addEventListener('click', event => { $('.reset', popup).addEventListener('click', event => {
event.preventDefault(); event.preventDefault();
@ -320,6 +321,7 @@ function setupLinterSettingsEvents(popup) {
rules = csslintDefaultRuleConfig; rules = csslintDefaultRuleConfig;
} }
popup.codebox.setValue(stringifyRules(rules)); popup.codebox.setValue(stringifyRules(rules));
popup.codebox.focus();
updateLinter(linter); updateLinter(linter);
}); });
$('.cancel', popup).addEventListener('click', event => { $('.cancel', popup).addEventListener('click', event => {