Initial focus in dialogs
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 18 Jun 2013 12:00:13 +0000 (14:00 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 18 Jun 2013 12:00:13 +0000 (14:00 +0200)
modules/data/saveDialog.js
modules/documentHistory/restoreDialog.js

index aa6b285..2108276 100644 (file)
@@ -20,6 +20,7 @@ define([
             this.setElement(this.template());\r
             this.$el.modal({backdrop: 'static'});\r
             this.$el.modal('show');\r
             this.setElement(this.template());\r
             this.$el.modal({backdrop: 'static'});\r
             this.$el.modal('show');\r
+            this.$('textarea').focus();\r
 \r
         },\r
         onSave: function(e) {\r
 \r
         },\r
         onSave: function(e) {\r
index 543a546..0110240 100644 (file)
@@ -20,7 +20,7 @@ define([
             this.setElement(this.template());\r
             this.$el.modal({backdrop: 'static'});\r
             this.$el.modal('show');\r
             this.setElement(this.template());\r
             this.$el.modal({backdrop: 'static'});\r
             this.$el.modal('show');\r
-\r
+            this.$('textarea').focus();\r
         },\r
         onSave: function(e) {\r
             e.preventDefault();\r
         },\r
         onSave: function(e) {\r
             e.preventDefault();\r