Merge pull request #2139 from katrinleinweber/2130-autofocus-separatorInput

Auto-focus input fields into which users likely type immediately
This commit is contained in:
Antonin Delpeuch 2019-08-31 14:10:30 +01:00 committed by GitHub
commit 9d72de1874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -305,6 +305,8 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
elmts.separatorInput.focus().select();
elmts.cancelButton.click(dismiss);
elmts.okButton.click(function() {
var mode = $("input[name='split-by-mode']:checked")[0].value;

View File

@ -278,6 +278,8 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
elmts.separatorInput.focus().select();
elmts.cancelButton.click(dismiss);
elmts.okButton.click(function() {
var mode = $("input[name='split-by-mode']:checked")[0].value;