Search code examples
javascriptsapui5eventhandlermouseenter

Sap ui5 : why attachEvent method doesnt work with "mouseenter" event?


I'm trying to add mouseenter handler to one of the control (PlanningCalendarAppointment). Thats what i have tried already.

control.attachEvent("mouseenter", function () {
       console.log("test"); // Fixed compilation error
});

but it doesnt give any effects.


Solution

  • Please try .attachBrowserEvent instead of attachEvent:

    control.attachBrowserEvent("mouseenter", function () {
           console.log("test"); // Fixed compilation error
    });