Merge pull request #16659 from agentbellnorm/techdocs/remove-warnings
[TechDocs] remove warnings
This commit is contained in:
@@ -84,11 +84,13 @@ export const useShadowRootSelection = (waitMillis: number = 0) => {
|
||||
|
||||
useEffect(() => {
|
||||
window.document.addEventListener('selectionchange', handleSelectionChange);
|
||||
return () =>
|
||||
return () => {
|
||||
handleSelectionChange.cancel();
|
||||
window.document.removeEventListener(
|
||||
'selectionchange',
|
||||
handleSelectionChange,
|
||||
);
|
||||
};
|
||||
}, [handleSelectionChange]);
|
||||
|
||||
return selection;
|
||||
|
||||
Reference in New Issue
Block a user