X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=common%2Ftextarea.js;h=ec79e0dc84f42599e73bf82026302a1819b34421;hb=64f1c4dfd7425931fcd1bd9949157c0ba6958656;hp=b3a9590010e0f145495897e8b1d55fe2d0d92b54;hpb=0b5dcc08f7f673a84f627e5e7d51fd46a21c66f4;p=dygraphs.git diff --git a/common/textarea.js b/common/textarea.js index b3a9590..ec79e0d 100644 --- a/common/textarea.js +++ b/common/textarea.js @@ -112,14 +112,14 @@ TextArea.prototype.show = function(title, content) { } } - Dygraph.addEvent(document, "keydown", this.keyDownListener_); + document.addEventListener("keydown", this.keyDownListener_); this.reposition(); window.addEventListener('resize', this.reposition, false); document.documentElement.addEventListener('onscroll', this.reposition); } TextArea.prototype.hide = function() { - Dygraph.removeEvent(document, "keypress", this.keyDownListener_); + document.removeEventListener('keypress', this.keyDownListener_); this.keyDownListener_ = null; this.elem.style.display = "none"; this.background.style.display = "none";