nice keyboard refreshing and all htat jazz workingggg

This commit is contained in:
Peter Cottle 2013-01-01 14:54:04 -08:00
parent 69235f4b37
commit a2c3fcabf5
3 changed files with 66 additions and 8 deletions

View file

@ -27,8 +27,16 @@ var init = function(){
};
focusTextArea();
$(window).focus(focusTextArea);
$(document).click(focusTextArea);
$(window).focus(function(e) {
eventBaton.trigger('windowFocus', e);
});
$(document).click(function(e) {
eventBaton.trigger('documentClick', e);
});
// the default action on window focus and document click is to just focus the text area
eventBaton.stealBaton('windowFocus', focusTextArea);
eventBaton.stealBaton('documentClick', focusTextArea);
// but when the input is fired in the text area, we pipe that to whoever is
// listenining