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

input-group-addon on both sides does not work #1451

Closed
vsc55 opened this issue Jul 25, 2016 · 9 comments
Closed

input-group-addon on both sides does not work #1451

vsc55 opened this issue Jul 25, 2016 · 9 comments

Comments

@vsc55
Copy link

vsc55 commented Jul 25, 2016

If we "input-group-addon" before and after select select stops working. They go round the edges.

bootstrap-select_test_page_-_2016-07-25_11 59 15

Code Example:
<div class="input-group">
<span class="input-group-addon">@</span>
<select class="form-control selectpicker">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
<span class="input-group-addon">@</span>
</div>

@giro83
Copy link

giro83 commented Aug 6, 2016

I can confirm the above.

@caseyjhol
Copy link
Member

This is actually an issue with Bootstrap. There's a mistake in the CSS that incorrectly applies border-radius: 0; to the .input-group-btn parent, instead of the button itself. Add:

.input-group-btn:not(:first-child):not(:last-child) > .btn {
  border-radius: 0;
}

@vsc55
Copy link
Author

vsc55 commented Aug 7, 2016

OK, Fixed.
Thank you very much.

@vsc55 vsc55 closed this as completed Aug 7, 2016
@vsc55 vsc55 reopened this Aug 7, 2016
@vsc55
Copy link
Author

vsc55 commented Aug 7, 2016

Besides adding "border-radius" also add height:

.input-group-btn:not(:first-child):not(:last-child) > .btn {
  border-radius: 0;
  height: 100%;
}

@caseyjhol
Copy link
Member

In what scenario is height: 100% needed?

@vsc55
Copy link
Author

vsc55 commented Aug 9, 2016

Not mandatory, but highly recommended if.
I've had problems since the span of the sides were higher than normal and the select is not occupied the entire area.
Thus no matter the height of the side span is set as 100%.

Without height not set to 100% can happen:
4b8f7e3a-525f-11e6-9e2a-fc9c9f38ceec

@giro83
Copy link

giro83 commented Aug 9, 2016

If this is a bug in bootstrap, is someone proficient / familiar in reporting bugs to them raising this? Just saying, so we won't have to use a workaround forever.

@caseyjhol
Copy link
Member

Well, bug might not have been the best word to use. I considered reporting it, but as far as I can tell, Bootstrap doesn't support having button groups next to input-group-addons (at least not officially). .input-group-btn:not(:first-child):not(:last-child) having a border-radius of 0 is more a result of consolidating the CSS than anything on purpose, I think. In addition, width: 100% would need to be added to the .btn, I'm not sure they'd be cool with that. Maybe I'll submit it, but I will be adding this fix into bootstrap-select officially.

@algopill-nadav
Copy link

any solution ?

avantika-gupta-jtg pushed a commit to JoshLabs/bootstrap-select that referenced this issue May 14, 2020
avantika-gupta-jtg pushed a commit to JoshLabs/bootstrap-select that referenced this issue May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants