а

attachEvent "onBeforeEventChanged" not giving Event Object on Mobile


#1
        .attachEvent("onBeforeEventChanged", (ev, e, is_new) => {
    						console.log(e);
    						e.preventDefault(); // error on this line in mobile device
.....
}

EventObject(e) On Desktop
MouseEvent {isTrusted: true, screenX: 1022, screenY: 563, clientX: 1022, clientY: 429, …}

EventObject(e) On Mobile
{target: div.dhx_scale_holder_now., pageX: 245.877197265625, pageY: 321.1659240722656, clientX: 245.877197265625, clientY: 321.1659240722656, …}


#2

Hi,

If you need an event object, you should get the first ev parameter instead of the second e.
https://docs.dhtmlx.com/scheduler/api__scheduler_onbeforeeventchanged_event.html

Here is the demo the returns ev.text as an example: https://snippet.dhtmlx.com/426b717cf
Screenshot from a mobile device: http://prntscr.com/oz697b


#3

You are correct ev second parameter is for event object of the scheduler, but in need native event object which is the first parameter