Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console error: Focus handling does not check for config form properly #12341

Closed
ChristophHi opened this issue May 7, 2021 · 0 comments · Fixed by #12342
Closed

Console error: Focus handling does not check for config form properly #12341

ChristophHi opened this issue May 7, 2021 · 0 comments · Fixed by #12342
Assignees
Labels
a11y/keyboard ⌨️ Issues affecting keyboard-only navigation bug Something isn't working tiger-can-be-picked
Milestone

Comments

@ChristophHi
Copy link
Contributor

Configure coffee machine. Select values, tab through groups, and add configuration to cart. Configure cart entry configuration.
From time to time (not exactly reproducible) a console error appears when navigating to OV page:

core.js:4442 ERROR TypeError: Cannot read property 'querySelectorAll' of null
at SelectFocusUtility.query (select-focus.util.ts:33)
at SelectFocusUtility.findFocusable (select-focus.util.ts:70)
at KeyboardFocusService.findFocusable (tab-focus.service.ts:141)
at ConfiguratorStorefrontUtilsService.focusFirstAttribute (configurator-storefront-utils.service.ts:122)
at SafeSubscriber._next (configurator-previous-next-buttons.component.ts:96)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
at SafeSubscriber.next (Subscriber.js:122)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at SwitchMapSubscriber.notifyNext (switchMap.js:66)
at SimpleInnerSubscriber._next (innerSubscribe.js:10)
at SimpleInnerSubscriber.next (Subscriber.js:49)
at SwitchMapSubscriber.notifyNext (switchMap.js:66)
at SimpleInnerSubscriber._next (innerSubscribe.js:10)
at SimpleInnerSubscriber.next (Subscriber.js:49)

It seems to happen because the configuration form is no longer available. We either need to handle the non-availability of the form, or prevent focusFirstAttributes from being called in that situation

@ChristophHi ChristophHi added a11y/keyboard ⌨️ Issues affecting keyboard-only navigation bug Something isn't working labels May 7, 2021
@ChristophHi ChristophHi added this to the 4.0 milestone May 7, 2021
@ChristophHi ChristophHi changed the title Focus handling must check for config form properly Console error: Focus handling does not check for config form properly May 7, 2021
@ChristophHi ChristophHi self-assigned this May 7, 2021
@ChristophHi ChristophHi linked a pull request May 7, 2021 that will close this issue
@ChristophHi ChristophHi removed their assignment May 7, 2021
@Larisa-Staroverova Larisa-Staroverova self-assigned this May 10, 2021
ChristophHi added a commit that referenced this issue May 10, 2021
When the focus was set on previous/next navigation, the interactive configuration form was sometimes already teared down. This led to an error message in the console

Closes #12341
ChristophHi added a commit that referenced this issue May 10, 2021
When the focus was set on previous/next navigation, the interactive configuration form was sometimes already teared down. This led to an error message in the console

Closes #12341
ChristophHi added a commit that referenced this issue May 10, 2021
…12356)

When the focus was set on previous/next navigation, the interactive configuration form was sometimes already teared down. This led to an error message in the console

Closes #12341
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y/keyboard ⌨️ Issues affecting keyboard-only navigation bug Something isn't working tiger-can-be-picked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants