mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Stop the page from moving round when you use the arrow keys
This commit is contained in:
parent
a0605c281d
commit
03181dc54a
1 changed files with 7 additions and 0 deletions
|
@ -111,6 +111,13 @@ class BoardWindow extends EventEmitter
|
|||
this.keyboard.on("keyup-c", (function(event) {
|
||||
this.chunkCache.showRenderedChunks = !this.chunkCache.showRenderedChunks;
|
||||
}).bind(this));
|
||||
// Stop the document from scrolling around on some devices
|
||||
document.addEventListener("keyup", function(event) {
|
||||
if(event.keyCode >= 37 && event.keyCode <= 40) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
// Grab a reference to the sidebar and wrap it in an Interface class instance
|
||||
this.interface = new Interface(
|
||||
|
|
Loading…
Reference in a new issue