mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-28 18:50:08 +00:00
now keyboard handlers can break the propogation chain...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f3477e2d2a
commit
98d3a83f47
10
index.html
10
index.html
@ -372,13 +372,6 @@ function setupEditor(){
|
||||
}
|
||||
|
||||
|
||||
function clearEditor(){
|
||||
$('.current-page-indicator').children().remove()
|
||||
$('[contenteditable]').attr({contenteditable:"false"})
|
||||
MagazineScroller.start()
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
// general window behavior...
|
||||
@ -394,6 +387,7 @@ $(document).ready(function(){
|
||||
//ignore: '*'
|
||||
Esc: function(){
|
||||
$(':focus').blur()
|
||||
return false
|
||||
},
|
||||
},
|
||||
|
||||
@ -401,11 +395,9 @@ $(document).ready(function(){
|
||||
title: 'Global',
|
||||
doc: '',
|
||||
|
||||
/*
|
||||
Esc: function(){
|
||||
toggleEditor('?') == 'on' && toggleEditor('off')
|
||||
},
|
||||
*/
|
||||
|
||||
Home: firstPage,
|
||||
End: lastPage,
|
||||
|
||||
@ -147,6 +147,11 @@ function makeKeyboardHandler(keybindings, unhandled){
|
||||
} else {
|
||||
// simple callback...
|
||||
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
|
||||
continue
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user