Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Render on input group #24

Closed
palcarazm opened this issue Jul 7, 2022 · 4 comments · Fixed by #29
Closed

[BUG] Render on input group #24

palcarazm opened this issue Jul 7, 2022 · 4 comments · Fixed by #29
Assignees
Labels
bug Something isn't working
Milestone

Comments

@palcarazm
Copy link
Owner

Describe the bug
If you set the component in an input-group the render is not correct.

To Reproduce
Steps to reproduce the behavior:

<main class="container">
  <div class="input-group input-group-sm mb-3">
    <span class="input-group-text" id="inputGroup-sizing-sm">Small</span>
    <input type="checkbox" checked data-toggle="toggle" data-size="sm">
  </div>
  <div class="input-group mb-3">
    <span class="input-group-text" id="inputGroup-sizing-default">Default</span>
    <input type="checkbox" checked data-toggle="toggle">
  </div>
  <div class="input-group input-group-lg">
    <span class="input-group-text" id="inputGroup-sizing-lg">Large</span>
    <input type="checkbox" checked data-toggle="toggle" data-size="lg">
  </div>
</main>
<script>$('input[data-toggle="toggle"]').bootstrapToggle();</script>

Expected behavior
Render correctly

Screenshots

On Off
image image

Package (please complete the following information):

  • Bootstrap 5 Toggle version: 4.1.0
  • Bootstrap version: 5.1.3

Desktop (please complete the following information):

  • OS: Win
  • Browser: Chrome
@palcarazm palcarazm added the bug Something isn't working label Jul 7, 2022
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

Hi! 👋
Thanks for your issue. You are helping to improve Bootstrap 5 toggle.

@palcarazm
Copy link
Owner Author

refers: gitbrent#32
by: @daniel-scatigno
fixed base in : @bryan-brancotte comment

@palcarazm
Copy link
Owner Author

palcarazm commented Jul 7, 2022

hi @bryan-brancotte,

Do you want to fixed sending a pull-request for been corretly acknowledge?

Just in bootstrap 5 there is not needed to add the class input-group-btn, so the fix will be:

.input-group .toggle-on,
.input-group .toggle-off{
    position: absolute;
}

@palcarazm palcarazm added this to the v4.2.0 milestone Jul 7, 2022
@bryan-brancotte
Copy link

Hi @palcarazm

Thanks for the proposition, you can push the fix by yourself if you are ok with this.

@palcarazm palcarazm self-assigned this Jul 8, 2022
palcarazm added a commit that referenced this issue Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants