Fixed to focus on find-field (#2545)

* Adding function to autofocus text input when dialog opens

* Fixing code according to suggestion.

* Simplifying code,  removing function

Co-authored-by: Kovács Karolina <kovacskarolina0904@gmail.com>
This commit is contained in:
kovacskarolina 2020-04-16 19:05:40 +02:00 committed by GitHub
parent d2881ea911
commit e3be53146f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,6 +247,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
var level = DialogSystem.showDialog(frame);
var dismiss = function() { DialogSystem.dismissUntil(level - 1); };
elmts.cancelButton.click(dismiss);
elmts.text_to_findInput.focus();
elmts.okButton.click(function() {
var text_to_find = elmts.text_to_findInput[0].value;
var replacement_text = elmts.replacement_textInput[0].value;