Our powerful JS Calendar component


Post by skorer »

Hi,

I am getting an error when I am deleting event on the calendar.

deleteerror.png
deleteerror.png (137.21 KiB) Viewed 505 times

Post by tasnim »

We could not reproduce this issue. To assist you with your question, please provide more details including a runnable test case (as described in our support guidelines).

To get the fastest possible support, provide a simple test case based on our standard examples.


Post by Animal »

I can't reproduce this, but there is the situation when I get here after pressing the DELETE key:

Screenshot 2023-12-01 at 13.10.10.png
Screenshot 2023-12-01 at 13.10.10.png (498.99 KiB) Viewed 494 times

There's the "Outgoing" event. In order to keep focus close for accessibility purposes, we need to focus the closest remaining event. That's the fallback. You can see that here it's the event just above.

Then me.constructor.fromElement(fallback) looks up the DOM until it hits the view. That works. Set a breakpoint at that line and step fromElement. Because it should work. It looks at the element's ID, and if it has one, it gets the Bryntum widget by that ID. So soon it will reach <div id="b-weekview-?">. It will look that up and call that passed isCalendarMixin on it which is just

const isCalendarMixin = w => w.isCalendarMixin;

So all views mixin CalendarMixin, so it will return the WeekView that we are inside.

This is how it works. At what point does it diverge from this for you?


Post by skorer »

What if we try to delete the last event on the view? The situation on my case is this. It can not find any closest remaining event.


Post by mats »

Can you reproduce this in our online examples too? Which version are you using?


Post by Animal »

In that case, it should not even be going down that path.

See the if (fallback) test.

It should use me.viewContainer.revertFocus() which moves focus in an orderly way to the element that was focused before focus moved inside our ViewContainer.

We track focusin, and cache the focusIn event so that the relatedTarget can be used to move focus to if we become unfocusable for some reason.


Post by Animal »

Heres what happens when there are no events available to fall back to:

Screenshot 2023-12-01 at 17.41.17.png
Screenshot 2023-12-01 at 17.41.17.png (500.82 KiB) Viewed 480 times

Post by skorer »

Hi,

When I defined date picker as;

datePicker : {
            showEvents : 'dots'
        },

It is focusing the coloured dot on the date picker when I removed the last event on the view and getting an error. I tried with the showEvents : false and it works.


Post by Animal »

Thanks for the extra info. Focusing those dots should definitely not be possible. Will check it out.


Post by Animal »

We'll get this fixed in the next release: https://github.com/bryntum/support/issues/7978


Post Reply