Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 109 forks source link

position: "top" misbehaves when $.offsetParent() returns <html> element #65

Open jfly opened 9 years ago

jfly commented 9 years ago

The fix for me was to just add a relatively position div somewhere above the inputAutocomplete. I imagine the best fix would be for {{> inputAutocomplete}} to do that automatically.

Before:

<html>
    {{> inputAutocomplete settings=settings id="msg" class="input-xlarge" placeholder="Chat..."}}
</html>

after:

<html>
  <div style="position: relative">
    {{> inputAutocomplete settings=settings id="msg" class="input-xlarge" placeholder="Chat..."}}
  </div>
</html>

If this doesn't make sense, I can try to create a small reproducible example, but I'm new to meteor, and not sure what the best way to share something like that is.

mizzao commented 9 years ago

Ah, makes sense. I don't think I've ever used this in a setting where there wasn't an absolutely positioned div as a parent.