svelte-range-slider-pips
svelte-range-slider-pips copied to clipboard
[bug] Mouse interactions are misaligned if slider is inside iframe.
Describe the bug When slider is housed inside an iframe that is offset from the window (0,0) position, it is impossible to correctly use it. Starting to drag the slider with the mouse works fine (the ball can be picked up where it's visible). To actually set a value though mouse has to be moved to area where iframe would be if it was placed at (0,0) in the window.
To Reproduce
- ⛔ Fork this REPL as a reduced test case for any bug/issue submissions!
Expected behavior I would like the slider to know it's actual position not based on the window(?). Should there be an option to pass parent element?
Screenshots
If applicable, add screenshots to help explain your problem.
Device/Environment Please describe the environment and device the bug was found on, if relevant.
Additional context Add any other context about the problem here.
thanks for the detailed bug report! appreciate that and will investigate asap
oh do you think you could use the REPL to reproduce the issue for me?
(which is funny, because the REPL is inside an iFrame 🤔 )
Yeah just debugged REPL and indeed it is using iframe. Wonder if there is some workaround or override in REPL done under the hood to make that iframe super isolated? Something I failed to do in the project I am working on (and unfortunately can't just share it :( )
For now in that project I just reverted to using plain <input type="range".../> and it is handling the position just fine out of the box.
Yeah just debugged REPL and indeed it is using iframe. Wonder if there is some workaround or override in REPL done under the hood to make that iframe super isolated?
not sure, are you using any special positioning or transforms on the iFrame? I would imagine something since I can see it's working more like a traditional frameset (whole height, right-side). Is it in a grid, or flexbox ?