MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / focusEvent

Function focusEvent

codebase/sources/dhtmlxscheduler.es.js:12674–12695  ·  view source on GitHub ↗
(evNode)

Source from the content-addressed store, hash-verified

12672 }
12673 }
12674 function focusEvent(evNode) {
12675 if (!scheduler2.config.key_nav)
12676 return;
12677 if (!dispatcher.isEnabled())
12678 return;
12679 var prevState = evNode;
12680 var focusNode = new scheduler2.$keyboardNavigation.Event(prevState.eventId);
12681 if (!focusNode.isValid()) {
12682 var lastStart = focusNode.start || prevState.start;
12683 var lastEnd = focusNode.end || prevState.end;
12684 var lastSection = focusNode.section || prevState.section;
12685 focusNode = new scheduler2.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);
12686 if (!focusNode.isValid()) {
12687 focusNode = new scheduler2.$keyboardNavigation.TimeSlot();
12688 }
12689 }
12690 dispatcher.setActiveNode(focusNode);
12691 var node = dispatcher.getActiveNode();
12692 if (node && node.getNode && document.activeElement != node.getNode()) {
12693 dispatcher.focusNode(dispatcher.getActiveNode());
12694 }
12695 }
12696 var updateEvent = scheduler2.updateEvent;
12697 scheduler2.updateEvent = function(id) {
12698 var res = updateEvent.apply(this, arguments);

Callers 1

scheduler_handlersFunction · 0.70

Calls 1

getNodeMethod · 0.45

Tested by

no test coverage detected