Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/modules/Popup/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const Popup = React.forwardRef(function (props, ref) {
eventsEnabled = true,
flowing,
header,
hideOnScroll,
inverted,
offset,
pinned = false,
Expand Down Expand Up @@ -179,8 +180,8 @@ const Popup = React.forwardRef(function (props, ref) {
_.invoke(props, 'onOpen', e, { ...props, open: true })
}

const hideOnScroll = (e) => {
debug('hideOnScroll()')
const handleHideOnScroll = (e) => {
debug('handleHideOnScroll()')

// Do not hide the popup when scroll comes from inside the popup
// https://github.com/Semantic-Org/Semantic-UI-React/issues/4305
Expand Down Expand Up @@ -253,7 +254,7 @@ const Popup = React.forwardRef(function (props, ref) {
) : (
children
)}
{hideOnScroll && <EventStack on={hideOnScroll} name='scroll' target='window' />}
{hideOnScroll && <EventStack on={handleHideOnScroll} name='scroll' target='window' />}
</ElementType>
)

Expand Down
Loading