kaihenzler / angular-minicolors

A wrapper around JQuery MiniColors
http://kaihenzler.github.io/angular-minicolors/
MIT License
75 stars 51 forks source link

form-group div is getting removed #23

Closed newmanw closed 8 years ago

newmanw commented 9 years ago

I start with this html:

          <div class="row">
            <div class="col-sm-12>
              <label class="control-label" for="poop">Some Color</label>
              <div class="form-group">
                <input id="poop" minicolors="minicolorSettings" class="form-control" type="text" ng-model="someColor">
              </div>
            </div>
          </div>

And the

is removed from the html.

newmanw commented 9 years ago

Note: Since the directive seems to mess with the parent div that has the form group I was able to workaround this issue by adding an extra div around the input:

              <div class="form-group">
                <div><input id="poop" minicolors="minicolorSettings" class="form-control" type="text" ng-model="someColor"></div>
              </div>

Still should probably be fixed at some point.

newmanw commented 9 years ago

Sorry, looks like this relates to #20

However #20 is closed and says the docs are updated. But the docs read:

<div class="form-group">
  <label for="color-input" class="form-control">Color:</label>
  <input
    minicolors="customSettings"
    id="color-input"
    class="form-control"
    type="text"
    ng-model="input.color">
</div>

When I think they should read:

<div class="form-group">
  <label for="color-input" class="form-control">Color:</label>
  <div>
    <input
      minicolors="customSettings"
      id="color-input"
      class="form-control"
      type="text"
      ng-model="input.color">
  </div>
</div>
kaihenzler commented 9 years ago

@newmanw thanks for pointing that out. I will try to either update the demo page or to render the directive into a

template, which should fix this problem.

kind regards, Kai

newmanw commented 9 years ago

@kaihenzler no worries and thanks. Great directive!

kaihenzler commented 8 years ago

closing since it doesn't seem relevant anymore. reopen it if your still looking for a fix.