Commit 45439f71 authored by Steven Wittens's avatar Steven Wittens

- #42913: Avoid resizable textarea drag handler loop

- #42911: Remove left-over event handling code
parent 7a2d7d09
......@@ -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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment