diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-04 22:20:59 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-04 22:20:59 +0000 |
commit | 45439f71d06fe54068c2c2bb8172dae44e3e1644 (patch) | |
tree | cc64ee5fe5f7f09861ba8791c825e7b314143221 /misc | |
parent | 7a2d7d0937309eea379622d6446da45a28c8cd5d (diff) | |
download | brdo-45439f71d06fe54068c2c2bb8172dae44e3e1644.tar.gz brdo-45439f71d06fe54068c2c2bb8172dae44e3e1644.tar.bz2 |
- #42913: Avoid resizable textarea drag handler loop
- #42911: Remove left-over event handling code
Diffstat (limited to 'misc')
-rw-r--r-- | misc/textarea.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/textarea.js b/misc/textarea.js index e33c35bcc..2d496803c 100644 --- a/misc/textarea.js +++ b/misc/textarea.js @@ -30,7 +30,6 @@ function textArea(element) { this.wrapper.appendChild(this.grippie); this.grippie.dimensions = dimensions(this.grippie); this.grippie.onmousedown = function (e) { ta.beginDrag(e); }; - this.element.onmouseup = function (e) { ta.endDrag(e); }; // Set wrapper and textarea dimensions this.wrapper.style.height = this.dimensions.height + this.grippie.dimensions.height + 1 +'px'; @@ -62,6 +61,11 @@ function textArea(element) { } textArea.prototype.beginDrag = function (event) { + if (document.isDragging) { + return; + } + document.isDragging = true; + event = event || window.event; // Capture mouse var cp = this; @@ -103,5 +107,6 @@ textArea.prototype.endDrag = function (event) { // Restore opacity this.element.style.opacity = 1.0; + document.isDragging = false; } |