Add handler to close post widget on ESC
handlers: {
onPostVisibility: "postVisibilityUpdate",
onLogin: "loggedIn",
- onLogout: "loggedOut"
+ onLogout: "loggedOut",
+ onkeydown: "keyHandler"
},
components: [
{tag: "h2", content: "What's on your mind?"},
this.$.toolbar.reflow();
this.reflow();
} else {
+ this.$.postContent.node.blur();
setTimeout(function() {
this.hide();
this.removeClass('exit');
this.loadHelp();
}
},
+ keyHandler: function(inSender, inEvent) {
+ if (inEvent.which == 27) {
+ this.closePost();
+ }
+ }
});