Browse code

focus paste inputs

devnewton authored on 11/03/2017 at 08:36:18
Showing 3 changed files
... ...
@@ -38,6 +38,9 @@ var jb3PasteEmojiConstructor = function () {
38 38
         self.trigger('paste-content-changed');
39 39
         self.update();
40 40
     };
41
+    self.on('updated', function () {
42
+        self.terms.focus();
43
+    });
41 44
 };
42 45
 
43 46
 var jb3PasteEmojiStyles = '\
... ...
@@ -29,6 +29,9 @@ var jb3PasteTextConstructor = function () {
29 29
         xhr.send(self.ptext.value);
30 30
         return false;
31 31
     };
32
+    self.on('updated', function () {
33
+        self.ptext.focus();
34
+    });
32 35
 };
33 36
 
34 37
 var jb3PasteTextStyles = '\
... ...
@@ -10,7 +10,7 @@ var jb3PasteTotozConstructor = function () {
10 10
         var xhr = new XMLHttpRequest();
11 11
         xhr.onreadystatechange = function (event) {
12 12
             if (xhr.readyState === 4) {
13
-            	self.pasted = "";
13
+                self.pasted = "";
14 14
                 if (xhr.status === 200) {
15 15
                     self.totozList = JSON.parse(xhr.response);
16 16
                 } else {
... ...
@@ -38,6 +38,9 @@ var jb3PasteTotozConstructor = function () {
38 38
         self.trigger('paste-content-changed');
39 39
         self.update();
40 40
     };
41
+    self.on('updated', function () {
42
+        self.terms.focus();
43
+    });
41 44
 };
42 45
 
43 46
 var jb3PasteTotozStyles = '\