X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FPost.js;fp=www%2Fjssrc%2Fblerg%2FPost.js;h=221d56a4517f08240187320d47f825ed4f95ad7d;hb=fb5d7c1d3a64aab8135be45b522bec2805e196f7;hp=f39520ef902c3199bfef6e62784fb60c369d8583;hpb=6778ec81726c7c5dc04ceef2ca68b410df890470;p=blerg.git diff --git a/www/jssrc/blerg/Post.js b/www/jssrc/blerg/Post.js index f39520e..221d56a 100644 --- a/www/jssrc/blerg/Post.js +++ b/www/jssrc/blerg/Post.js @@ -5,7 +5,8 @@ enyo.kind({ handlers: { onPostVisibility: "postVisibilityUpdate", onLogin: "loggedIn", - onLogout: "loggedOut" + onLogout: "loggedOut", + onkeydown: "keyHandler" }, components: [ {tag: "h2", content: "What's on your mind?"}, @@ -93,6 +94,7 @@ enyo.kind({ this.$.toolbar.reflow(); this.reflow(); } else { + this.$.postContent.node.blur(); setTimeout(function() { this.hide(); this.removeClass('exit'); @@ -132,4 +134,9 @@ enyo.kind({ this.loadHelp(); } }, + keyHandler: function(inSender, inEvent) { + if (inEvent.which == 27) { + this.closePost(); + } + } });