mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
CalendarOwner: Bind a listener to mousewheel and stop it from bubbling, otherwise scrolling results scrolls the sidemenu
This commit is contained in:
parent
8cc14a9919
commit
e8e1077ece
@ -38,6 +38,20 @@ export class CalendarOwner extends Et2Select
|
|||||||
super(...args);
|
super(...args);
|
||||||
this.searchUrl = "calendar_owner_etemplate_widget::ajax_search";
|
this.searchUrl = "calendar_owner_etemplate_widget::ajax_search";
|
||||||
this.multiple = true;
|
this.multiple = true;
|
||||||
|
|
||||||
|
this._handleMouseWheel = this._handleMouseWheel.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
_bindListeners()
|
||||||
|
{
|
||||||
|
super._bindListeners();
|
||||||
|
|
||||||
|
this.addEventListener("mousewheel", this._handleMouseWheel);
|
||||||
|
}
|
||||||
|
|
||||||
|
_unbindListeners()
|
||||||
|
{
|
||||||
|
this.removeEventListener("mousewheel", this._handleMouseWheel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,6 +106,16 @@ export class CalendarOwner extends Et2Select
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop scroll from bubbling so the sidemenu doesn't scroll too
|
||||||
|
*
|
||||||
|
* @param {MouseEvent} e
|
||||||
|
*/
|
||||||
|
_handleMouseWheel(e : MouseEvent)
|
||||||
|
{
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a free entry value is acceptable.
|
* Check if a free entry value is acceptable.
|
||||||
* We only check the free entry, since value can be mixed.
|
* We only check the free entry, since value can be mixed.
|
||||||
|
Loading…
Reference in New Issue
Block a user