From f4fcda2f29d7c2efe91d9afabf7d5fcd4bd04b5a Mon Sep 17 00:00:00 2001 From: Chip Black Date: Mon, 23 Apr 2012 21:01:38 -0700 Subject: [PATCH] Fix record [reply] links --- www/jssrc/blerg/Post.js | 5 ++++- www/jssrc/blerg/Record.js | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/www/jssrc/blerg/Post.js b/www/jssrc/blerg/Post.js index 1f7ea7d..a43abf8 100644 --- a/www/jssrc/blerg/Post.js +++ b/www/jssrc/blerg/Post.js @@ -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(); } diff --git a/www/jssrc/blerg/Record.js b/www/jssrc/blerg/Record.js index 8fe0947..5d4cf23 100644 --- a/www/jssrc/blerg/Record.js +++ b/www/jssrc/blerg/Record.js @@ -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() { -- 2.25.1