How to add scroll event on modal? #858
Answered
by
lubber-de
fuyunliu
asked this question in
Modules (Modal, Dropdown, Popup, Calendar, Toast, ...)
-
scroll event on modalMac OS 10.14.5 Problemfunction ping() {alert('pong')}
// not working
window.addEventListener('scroll', ping)
// not working
document.addEventListener('scroll', ping)
// not working
document.querySelector('div.ui.modal').addEventListener('scroll', ping) |
Beta Was this translation helpful? Give feedback.
Answered by
lubber-de
Jul 8, 2019
Replies: 1 comment
-
@fuyunliu It depends on the kind of scrollable modal:
See difference here: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lubber-de
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@fuyunliu It depends on the kind of scrollable modal:
page dimmer
, thus you set your listener to the dom node.page.dimmer
scrolling content
gets scrollable via the.content
, thus you set your listener to the dom node.modal .content
See difference here:
https://jsfiddle.net/f2mradto/1/