Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3485589
D3678.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
609 B
Referenced Files
None
Subscribers
None
D3678.diff
View Options
diff --git a/web/components/menu.react.js b/web/components/menu.react.js
--- a/web/components/menu.react.js
+++ b/web/components/menu.react.js
@@ -58,11 +58,7 @@
return () => window.removeEventListener('resize', updatePosition);
}, [updatePosition]);
- // useLayoutEffect is necessary so that the menu position is immediately
- // updated in the first render of component
- React.useLayoutEffect(() => {
- updatePosition();
- }, [updatePosition]);
+ React.useEffect(updatePosition, [updatePosition]);
const closeMenuCallback = React.useCallback(() => {
closeMenu(menuActionList);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 10:43 PM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2674786
Default Alt Text
D3678.diff (609 B)
Attached To
Mode
D3678: [web] [fix] [ENG-986] replace useLayoutEffect with useEffect
Attached
Detach File
Event Timeline
Log In to Comment