leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.64k stars 658 forks source link

Pips container (noUi-pips) DOM placement #1179

Closed dave0783 closed 2 years ago

dave0783 commented 2 years ago

I have a situation that has arisen where the pips need to be positioned atop of the slider. Adjusting the positioning to place them atop the slider works as expected; however if you are using the connect option, you cannot get the positioning atop the connect container noUi-connect. Upon inspecting the DOM generated, I have come to the conclusion that this is happening because the container noUi-pips is rendered outside of noUi-base making the necessary z-index changes impossible. Is there a way to place the noUi-pips container inside of noUi-base

leongersen commented 2 years ago

I don't see issues in moving the .noUi-pips element to .noUi-base (using, for example, appendChild). I think this'd be too niche to create an option for this in the library.

dave0783 commented 2 years ago

Are you suggesting I programmatically move .noUi-pips inside of .noUi-base? To be clear, I'm suggesting the default markup be changed so that .noUi-pips is rendered inside of .noUi-base

leongersen commented 2 years ago

Are you suggesting I programmatically move .noUi-pips inside of .noUi-base?

Yep. I don't want to make this the default, though.

dave0783 commented 2 years ago

It seems rather inefficient to programmatically change this when there is seemingly no reason to not make this to default; I would think the positioning I’m talking about would be a common scenario. If there is a reason you wouldn’t want to make it the default, I would suspect there must be a reason why programmatically moving it would be an issue.

~Dave On Jan 31, 2022, 6:15 AM -0500, Léon Gersen @.***>, wrote:

Are you suggesting I programmatically move .noUi-pips inside of .noUi-base? Yep. I don't want to make this the default, though. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

leongersen commented 2 years ago

I would suspect there must be a reason why programmatically moving it would be an issue.

I don't think there is one. I'd rather not make this breaking change for implementations depending on the current structure.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.