Closed Aarkon closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity. If this issue is still actual, please, create the new one.
This is a (multiple allowed):
[x] bug
[x] enhancement
[ ] feature-discussion (RFC)
Swiper Version: 5.3.0
Platform/Target and Browser Versions: Firefox, Chrome (not tested on Safari but I expect no difference there)
What you did
I have a project with Web Components, featuring text inputs inside the Shadow DOM and the Swiper instantiated in the host, the "Light" DOM. I'd like to be able to enter text in those inputs, therefore I need to disable swiping on those elements (otherwise you can't place the text cursor them).
HTML:
index.js:
todoSD.js:
Expected Behavior
Passing something either
noSwipingSelector: 'input'
to the swiperOptions or attachingclass="swiper-no-swiping"
to the inputs should disable swiping on the corresponding element. And in fact, everything works fine if I ditch the Shadow DOM. Seetodo.js
for reference:Actual Behavior
Using the Shadow DOM option, neither option is effective. I can't observe any difference in behaviour whether I supply a noSwipingSelector, the predefined CSS class, a self defined one or any combination of the above.
If I had to put my money somewhere, I'd humbly suggest that the onTouchStart function needs to inspect the handed in events more deeply, but I'm not an expert on Web Components. Anyway, thank you for the great work so far!