Here's my hacky workaround until I can add popper as a peer dep: (I'm aware of the fragile selectors)
/* Hacky workaround for Popup displaying briefly due to React 18 updates.
https://github.com/Semantic-Org/Semantic-UI-React/issues/4350
TODO: Remove this hack once semantic-ui-react supports adding peerDependencies:
https://github.com/Semantic-Org/Semantic-UI-React/issues/4354
The hack below hides the Portal element until the component adds the inset style: */
body:last-child div[style^='display: flex; position: absolute;'] & {
visibility: hidden !important;
}
body:last-child div[style^='display: flex; position: absolute; inset: 0px auto auto 0px;'] &,
body:last-child div[style^='display: flex; position: absolute; inset: auto auto 0px 0px;'] & {
visibility: visible !important;
}
Popup, initial position in React ^18.x.x. Initial jumping.
Bug Report
Popup has fixed initial position on the screen.
Steps
Problem happens in Popup with on='hover'
Expected Result
Popup position near trigger element based on position property.
Actual Result
Top/left screen position for a few ms.
Version
2.1.2
Testcase
https://codesandbox.io/s/semantic-ui-react-forked-ky6fpt?file=/index.js