Auto-focus first input field in modal overlays
authorAlexander Ebert <ebert@woltlab.com>
Mon, 27 Oct 2014 14:46:03 +0000 (15:46 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 27 Oct 2014 14:46:03 +0000 (15:46 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index b61700cc7d6e62593a6260439089daabdbda5910..233a42842b3a4c9af518e92c25c32d5db1514529 100644 (file)
@@ -345,6 +345,9 @@ RedactorPlugins.wmonkeypatch = function() {
                                        onClose: $.proxy(this.modal.close, this),
                                        title: this.modal.title
                                });
+                               
+                               // focus first input field
+                               this.modal.dialog.find('input:first').focus();
                        }).bind(this);
                        
                        // modal.createButton