@@ -34,7 +34,7 @@ export default class MouseFollower {
3434 * @param {string} options.hiddenState Hidden state name.
3535 * @param {string} options.textState Text state name.
3636 * @param {string} options.iconState Icon state name.
37- * @param {string} options.activeState Active (mousedown) state name.
37+ * @param {string|null } options.activeState Active (mousedown) state name. Set false to disable .
3838 * @param {string} options.mediaState Media (image/video) state name.
3939 * @param {object} options.stateDetection State detection rules.
4040 * @param {boolean} options.visible Is cursor visible by default.
@@ -232,8 +232,10 @@ export default class MouseFollower {
232232 if (this.options.visible) {
233233 this.container.addEventListener('mouseenter', this.event.mouseenter, {passive: true});
234234 }
235- this.container.addEventListener('mousedown', this.event.mousedown, {passive: true});
236- this.container.addEventListener('mouseup', this.event.mouseup, {passive: true});
235+ if (this.options.activeState) {
236+ this.container.addEventListener('mousedown', this.event.mousedown, {passive: true});
237+ this.container.addEventListener('mouseup', this.event.mouseup, {passive: true});
238+ }
237239 this.container.addEventListener('mousemove', this.event.mousemove, {passive: true});
238240 if (this.options.visible) {
239241 this.container.addEventListener('mousemove', this.event.mousemoveOnce, {
0 commit comments