search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Avoid focusing an event on keyboard.focusCell

Asked by Manuel
11 days ago.

We sometimes have overlapping events. In this case when i click on a cell in event-line-1, i would expect the scheduler to focus the cell under the event, but it always focuses the event from event-line-0. We already tried moving the focus with the arrow keys, but it seems that there is no consistent solution to focus the underlying cell.

In the attached screenshot i marked the click position with a red x, as you can see the Event 9 is focused instead of the cell in row “Tool 1” and column “05.07.2025”.

Is this expected behavior or is there a way to override it?

Answer posted by Dan Letecky [DayPilot]
11 days ago.

The current implementation of keyboard.focusCell() finds the default keyboard cursor position for the specified cell. That can be an event if it is at the top position (line 0).

However, it should be possible to add an option to focus the cell, if possible. Please let me check that.

I assume that you are trying to sync the time range selection made using a mouse with the keyboard focus, is that correct?

Comment posted by Manuel
9 days ago.

Yes, we want the keyboard focus to be set onto the cell that is selected with onTimeRangeSelect.

An option for that would be very cool, since it is a bit confusing that focusCell is not necessarily focusing a cell.

Comment posted by Dan Letecky [DayPilot]
2 days ago.

Thanks for the update!

Since build 2024.4.6190, the implementation of keyboard.focusCell() has changed, and now it always tries to focus the cell itself if possible.

See also the list of implemented changes.

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):