Fix record [reply] links
authorChip Black <bytex64@bytex64.net>
Tue, 24 Apr 2012 04:01:38 +0000 (21:01 -0700)
committerChip Black <bytex64@bytex64.net>
Tue, 24 Apr 2012 04:01:38 +0000 (21:01 -0700)
www/jssrc/blerg/Post.js
www/jssrc/blerg/Record.js

index 1f7ea7d..a43abf8 100644 (file)
@@ -31,8 +31,11 @@ enyo.kind({
     postVisibilityUpdate: function(inSender, inEvent) {
         if (inEvent.showing) {
             this.show();
-            if (inEvent.data && this.getData() == "")
+            this.$.postContent.focus();
+            if (inEvent.data && this.getData() == "") {
                 this.setData(inEvent.data);
+                this.$.postContent.node.setSelectionRange(inEvent.data.length, inEvent.data.length);
+            }
         } else {
             this.hide();
         }
index 8fe0947..5d4cf23 100644 (file)
@@ -16,7 +16,7 @@ enyo.kind({
             {noDom: true, content: ". "},
             {name: "permalink", kind: "blerg.Link", content: "[permalink]"},
             {noDom: true, content: " "},
-            {name: "reply", kind: "blerg.Link", content: "[reply]", onclick: "postPopup"}
+            {name: "reply", kind: "blerg.Link", content: "[reply]", onNavigate: "postPopup"}
         ]}
     ],
     create: function() {
@@ -43,7 +43,7 @@ enyo.kind({
     postPopup: function() {
         this.bubble('onPostVisibility', {
             showing: true,
-            data: enyo.macroize("@{$author}/{$record}", this)
+            data: enyo.macroize("@{$author}/{$record}", this)
         });
         return true;
     }
@@ -62,7 +62,7 @@ enyo.kind({
             {noDom: true, content: ". "},
             {name: "permalink", kind: "blerg.Link", content: "[permalink]"},
             {noDom: true, content: " "},
-            {name: "reply", kind: "blerg.Link", content: "[reply]", onclick: "postPopup"}
+            {name: "reply", kind: "blerg.Link", content: "[reply]", onNavigate: "postPopup"}
         ]}
     ],
     updateLinks: function() {