mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
Call e.preventDefault() when the key was handled.
This commit is contained in:
parent
40dc097ebd
commit
d9bd8106fe
@ -333,17 +333,23 @@ var pdf2htmlEX = (function(){
|
||||
switch (e.keyCode) {
|
||||
case 33: // Page Down
|
||||
_.scroll_to_page(_.get_prev_page());
|
||||
e.preventDefault();
|
||||
break;
|
||||
case 34: // Page Up
|
||||
_.scroll_to_page(_.get_next_page());
|
||||
e.preventDefault();
|
||||
break;
|
||||
case 35: // End
|
||||
if (e.ctrlKey)
|
||||
if (e.ctrlKey) {
|
||||
_.scroll_to_page(_.pages[_.pages.length-1]);
|
||||
e.preventDefault();
|
||||
}
|
||||
break;
|
||||
case 36: // Home
|
||||
if (e.ctrlKey)
|
||||
if (e.ctrlKey) {
|
||||
_.scroll_to_page(_.pages[1]);
|
||||
e.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user