Possible bug in windowToggle when closingSelector returns EMPTY? #6714
d-bassarab
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Run example from https://rxjs.dev/api/operators/windowToggle:
The observed output does not match example description: "Every other second, emit the click events from the next 500ms". The console keeps reporting pointer events even while the window is closed, i % 2 is falsy and EMPTY is returned.
To investigate I rewrote the code to use longer intervals and replaced EMPTY with of(0).
The output while constantly clicking on the document is as expected:
Shouldn't EMPTY behave exactly as of(0), completing right away and thereby closing the window?
Beta Was this translation helpful? Give feedback.
All reactions