You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have observed that in useKeyborgRef, a new Keyborg instance is created by passing the defaultView from the targetDocument. There might be instances where the document is not associated with a window (e.g., an offscreen document). In such cases, defaultView can be null, and I do not see checks for this scenario in Keyborg.
@ling1726@mshoho — This may or may not be related to the issue we are encountering, but please let me know if this observation is relevant.
Component
Other...
Package version
9.56.8
React version
18.2.0
Environment
Current Behavior
The application is hitting this:
Error Message: Uncaught TypeError: Cannot read properties of null (reading '__keyborg')
Callstack:
TypeError: Cannot read properties of null (reading '__keyborg')
at new e (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:949615)
at e.create (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:949772)
at f (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:950387)
at https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:157425
at az (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:1058822)
at sH (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:1087871)
at l (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:1082425)
at S (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:1105138)
at MessagePort.R (https://res.public.onecdn.static.microsoft/owamail/hashed-v1/scripts/owa.43710.m.c7edbdb7.js:31:1105668)
Original Callstack:
webpack://owa/node_modules/keyborg/src/Keyborg.ts __keyborg 297
webpack://owa/node_modules/keyborg/src/Keyborg.ts 279
webpack://owa/node_modules/keyborg/src/Keyborg.ts create 369
webpack://owa/node_modules/@fluentui/react-tabster/lib/hooks/useKeyborgRef.js targetDocument 13
webpack://owa/node_modules/react-dom/cjs/react-dom.production.min.js d 244
webpack://owa/node_modules/react-dom/cjs/react-dom.production.min.js Rj 286
webpack://owa/node_modules/react-dom/cjs/react-dom.production.min.js Ik 282
webpack://owa/node_modules/react-dom/node_modules/scheduler/cjs/scheduler.production.min.js d 13
webpack://owa/node_modules/react-dom/node_modules/scheduler/cjs/scheduler.production.min.js O 14
Expected Behavior
No exception is thrown
Reproduction
https://aka.ms/fluentpen
Steps to reproduce
Only detected by telemetry
Are you reporting an Accessibility issue?
no
Suggested severity
High - No workaround
Products/sites affected
Outlook
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: