You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion!
Currently I don't see a way to make this work with :focus or :focus-within pseudo classes. :focus-within only works if the focus is on a descendant element, however the popup is not a descendant of the input field.
What could be done, is to use a css class instead, which is added to the input when the popup opens, and removed when it's closed, and add the same styling as for the focused input.
Something like:
onShow: function () {
this.classList.add('focused');
},
onClose: function () {
this.classList.remove('focused');
}
We might consider to make this built in, if it helps.
I use the
:focus-within
CSS selector to style the container for a specific input.https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-withinThis allows me to style the input, it's label and any other elements when they are in a focussed state.
This works well for normal inputs, however it seems that Mobiscroll doesn't properly handle this...
Expected behaviour (based on usual
input
&select
behaviour`:focus-within
CSS styling applied:focus-within
is still appliedCurrent incorrect behaviour:
:focus-within
CSS styling applied:focus-within
is appliedI'll be able to upload some videos which show correct and incorrect behaviour later
The text was updated successfully, but these errors were encountered: