bootstrap-switch-button icon indicating copy to clipboard operation
bootstrap-switch-button copied to clipboard

not sized with content if hidden at start

Open stphntlbt opened this issue 5 years ago • 4 comments

the toggle is not sized at the label's content (onlable or offlabel) if the container that contains it is hidden at the initialisation. the toggle and its container are not visible

stphntlbt avatar Mar 24 '20 12:03 stphntlbt

the problem is the getBoundingClientRect() used at step #7 : Set button W/H, lineHeight

https://stackoverflow.com/questions/42691675/how-to-getboundingclientrect-from-a-hidden-element-doesnt-work-on-ie

stphntlbt avatar Mar 24 '20 14:03 stphntlbt

Is there a fix / workaround for this?

csgregg avatar Nov 28 '22 15:11 csgregg

created a folk here where all works fine: https://github.com/digittal/bootstrap4-toggle

stphntlbt avatar Nov 28 '22 16:11 stphntlbt

Cheers! thank you @stphntlbt

csgregg avatar Nov 28 '22 17:11 csgregg