now keyboard handlers can break the propogation chain...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-03-04 17:36:24 +04:00
parent f3477e2d2a
commit 98d3a83f47
2 changed files with 6 additions and 9 deletions

View File

@ -372,13 +372,6 @@ function setupEditor(){
} }
function clearEditor(){
$('.current-page-indicator').children().remove()
$('[contenteditable]').attr({contenteditable:"false"})
MagazineScroller.start()
}
$(document).ready(function(){ $(document).ready(function(){
// general window behavior... // general window behavior...
@ -394,6 +387,7 @@ $(document).ready(function(){
//ignore: '*' //ignore: '*'
Esc: function(){ Esc: function(){
$(':focus').blur() $(':focus').blur()
return false
}, },
}, },
@ -401,11 +395,9 @@ $(document).ready(function(){
title: 'Global', title: 'Global',
doc: '', doc: '',
/*
Esc: function(){ Esc: function(){
toggleEditor('?') == 'on' && toggleEditor('off') toggleEditor('?') == 'on' && toggleEditor('off')
}, },
*/
Home: firstPage, Home: firstPage,
End: lastPage, End: lastPage,

View File

@ -147,6 +147,11 @@ function makeKeyboardHandler(keybindings, unhandled){
} else { } else {
// simple callback... // simple callback...
res = handler() res = handler()
// if the handler explicitly returned false break out...
if(res === false){
// XXX is this corrent???
return KEYBOARD_HANDLER_PROPAGATE ? res : null
}
did_handling = true did_handling = true
continue continue
} }