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

Update keyboard focus on clicking cells or events of frozen rows

Asked by Anonymous
1 year ago.

Referring to this ticket:

The following example will update the keyboard focus during time range selection (cell clicks):

dp.onTimeRangeSelected = args => {
  // ...
  dp.keyboard.focusCell(args.start, args.resource);

However, if the cell is disabled, then the event onTimeRangeSelected is not fired. So, I moved the code to the event onTimeRangeSelecting. This works well so far. However, if I select a cell in a frozen row, I get this error:

logging.service.ts:11 Error: Can't focus a cell in a frozen row
    at new DayPilot.Exception (daypilot-core.js:10)
    at Object.keyboard.focusCell (daypilot-core.js:35)
    at DayPilot.Scheduler.onTimeRangeSelecting (time-reporting-board.component.ts:334)
    at daypilot-core.js:34
    at DayPilot.Scheduler.Xk (daypilot-core.js:34)
    at DayPilot.Scheduler.vq (daypilot-core.js:33)
    at HTMLDivElement.Dp [as __zone_symbol__ON_PROPERTYmousedown] (daypilot-core.js:33)
    at HTMLDivElement.wrapFn (zone.js:763)
    at ZoneDelegate.invokeTask (zone.js:406)
    at Object.onInvokeTask (core.mjs:25437)

I assume that this is on purpose, but I don't understand the reason for it.

On the other side focusing an event in a frozen row works. However, when hit the tab or arrow keys to navigate, I get this error:
ERROR TypeError: Cannot read properties of undefined (reading 'indexOf')
    at Object.L.Qr (daypilot-core.js:35)
    at Object.keyboard.move (daypilot-core.js:35)
    at DayPilot.Scheduler.onKeyDown (scheduler.component.ts:222)
    at HTMLDocument.L.Yr (daypilot-core.js:35)
    at ZoneDelegate.invokeTask (zone.js:406)
    at Object.onInvokeTask (core.mjs:25864)
    at ZoneDelegate.invokeTask (zone.js:405)
    at Zone.runTask (zone.js:178)
    at ZoneTask.invokeTask [as invoke] (zone.js:487)
    at invokeTask (zone.js:1600)

I get the same error if I click on a cell in a frozen row, too. Of course without focusing the cell in onTimeRangeSelecting. In this case I get the first mentioned error.

You can reproduce the errors with this sample:

Comment posted by Dan Letecky [DayPilot]
1 year ago.

The keyboard navigation is not implemented for the frozen rows yet. Please let me check the status.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.