1.2.2 bug input #241

Closed
williamgueiros opened this Issue Oct 15, 2013 · 4 comments

Comments

Projects
None yet
2 participants

hello

now I try to using input with span ..
the documentation say to :
screen shot 2013-10-15 at 12 01 27 am

the source and result:

screen shot 2013-10-15 at 12 01 56 am
screen shot 2013-10-15 at 12 02 57 am

and before that I go to bootstrap to check class and see the difference.
screen shot 2013-10-15 at 12 02 10 am

bootStrap using class="input-group" instead of class="form-group" the result is:
screen shot 2013-10-15 at 12 03 18 am

but the result is difference don't change color backgroud color in @.
that is a bug?

pytkin commented Oct 15, 2013

Fixed.

<!-- Prepend -->
<div class="form-group">
  <div class="input-group">
    <span class="input-group-addon">@</span>
    <input class="form-control" type="text" placeholder="Prepend" />
  </div>
</div>

<!-- Append -->
<div class="form-group">
  <div class="input-group">                     
    <input class="form-control" type="text" placeholder="Append" />
    <span class="input-group-addon">@</span>
  </div>
</div>

pytkin closed this Oct 15, 2013

sorry but that source don't resolved the problem

for this code the result is:
screen shot 2013-10-16 at 1 34 22 am

this code don't change backgroud color in SPAN
I expect this result:
screen shot 2013-10-16 at 1 39 05 am

that is a bug?

pytkin commented Oct 16, 2013

Just add this JS(from js/application.js):

$(function() {
  // Focus state for append/prepend inputs
  $('.input-group').on('focus', '.form-control', function () {
    $(this).closest('.form-group, .navbar-search').addClass('focus');
  }).on('blur', '.form-control', function () {
    $(this).closest('.form-group, .navbar-search').removeClass('focus');
  });
});

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment