[SALESFORCE] Keyboard navigation is broken in Scheduler and Gantt
Hello there!
We have been investigating an old issue with using arrow keys to navigate tasks in Scheduler and Gantt. Pressing down/up key would skip a row, pressing right/left would not select past the first couple of tasks.
The behaviour is consistent in both Locker Service and Lightning Web Security.
We have narrowed it down to the wrap() function used by the EventHelper.fixEvent() override, yet still unsure how exactly does it cause this issue.
Removing the wrap() function fixes keyboard navigation, but introduces two new issues. Both issues are only observed in Locker, not in LWS.
The first one is an uncaught exception being thrown when pressing the Spacebar key to show a context menu.
The second one is another uncaught exception thrown when double-clicking a task in Scheduler Pro or Gantt after focusing another Bryntum widget in a separate Salesforce tab.
The second issue can be resolved by completely removing the fixEvent() override. It seems that the new event management logic in v6 works just fine without it.
The first issue is also fixable, it requires removal of the contextMenuKeyEvent variable and the conditional code that is using it from ContextMenuBase.onElementEvent() method. The event parameter passed into the onElementEvent() method is already an instance of MouseEvent with type="contextmenu", so creation of a new mouse event is unnecessary. Removing this code is safe as it has no impact on the context menu functionality outside of the Salesforce platform.
Thanks
Hello there! Is there any progress on this ticket?
I did some performance testing in Chrome DevTools earlier today and noticed a Forced Reflow insight in the sidebar.
Turns out, the fixEvent() override may cause style recalculation, which causes UI performance degradation.
It seems that by fixing this issue you would be hitting two birds with one stone!
Hi Aleksei! I am working on a ticket. The problem is that removing that code breaks context menu and some drag behaviour. This is that delayed this fix a bit.
Interesting... I did test this both on and off Salesforce and the context menu worked for me. Did not try dragging though. I will look into this later.
Thanks!
I was found a cause of the problem with context menu (my fault, deleted more than required). DND issue you can see in Drag from grid demo, just FYI
Hi Alexey, sorry for the late response.
I added the drag-from-grid demo to my Salesforce preview org setup but did not notice any issues with drag-and-drop with or without those changes.
I did, however, spot an issue with the context menu. I'm not sure if this is the issue that you also saw, but it is reproducible in the latest available version 6.2.3. The issue is that the context menu displayed in the event view is incorrect: it's the resource menu, not event menu. So it looks like a new unrelated bug.
In any case, I see that this ticket is marked as "ready for review", so I'm looking forward to test it once released.
FYI: I figured out the issue I saw with the context menu. https://github.com/bryntum/support/issues/11432
Thank you for updates @amurashincertinia! I am finishing with tests and will release the branch soon.