This article describes how to solve the problem that the Textarea scroll bar cannot be dragged in JavaScript. It mainly analyzes the corresponding processing method when the Textarea scroll bar in IE browser is bound to the onfocus event, for more information about how to drag the Textarea scroll bar in JavaScript, see the example in this article. We will share this with you for your reference. The details are as follows:
In IE, have you ever encountered that the scroll bar of Textarea cannot be dragged, but the content can be scrolled by clicking the up or down button?
The cause of this problem is probably that the onfocus event is bound to the Textarea, but the focus is removed (that is, blur () based on a certain condition ()), in this way, the scroll bar cannot be dragged.
A typical example is:
Me. $ input. on ("focus", function () {if ($ isIE & me. enabled = false) me. $ input. blur ();});
When the input control $ input (DOM element I. textarea) is bound to a focus event, and then set to unavailable (! If the focus is lost, the scroll bar cannot be dragged.
I hope this article will help you design JavaScript programs.