Skip to content

Improper cloned Bootstrap5-toggle element has wrong size #134

Answered by palcarazm
SoftCircuits asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @SoftCircuits,

I found the issue.

If the clone is not added to the html the min height is set to 0px. Just inverse tne append of the clone and render of the toggle.

Here a fork of your codepen with the fix

And a minimal reproduction code (in case someone else need it)

<main class="container bg-white px-3 py-3 rounded">
    <p>
        Click the button to clone the toggle control container.
    </p>

    <div id="source" class="row">
        <div class="col-md-3">
            <div class="mb-3 source-type">
                <input id="toggle-control" type="checkbox" class="form-control" data-toggle="toggle"
                    data-offlabel="Railcar" data-onlabel="Storage" data-offstyle="s…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by palcarazm
Comment options

You must be logged in to vote
1 reply
@palcarazm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #131 on May 11, 2023 06:38.