mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 03:50:16 +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(){ | $(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,  | ||||||
|  | |||||||
| @ -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 | ||||||
| 				} | 				} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user