Merge pull request #16659 from agentbellnorm/techdocs/remove-warnings

[TechDocs] remove warnings
This commit is contained in:
Morgan Bentell
2023-03-20 14:43:11 +01:00
committed by GitHub
74 changed files with 226 additions and 142 deletions
+3 -1
View File
@@ -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;