fritx / vue-at

At.js for Vue.
https://fritx.github.io/vue-at/
MIT License
529 stars 114 forks source link

Position bug when browser scrollbar is visible #10

Open ppietris opened 7 years ago

ppietris commented 7 years ago

Hello! It seems like suggestion box top position is wrong, when browser scrollbar is visible

scrollbug

fritx commented 7 years ago

Oh good catch @ppietris Will try to fix it soon.

fritx commented 7 years ago

@ppietris published in 2.0.7 😃

humblecoder commented 5 years ago

Positioning seems to be a problem all around, not just when the scrollbar is present. It would be good if there were some way to force the at-who to pop up exactly where the @ is being used. I'm not sure this is the solution, but we definitely need something.

LouizFC commented 5 years ago

@humblecoder At the time I opened that issue I was learning Vue, but ended up dropping it for something that I was more familiar with.

I will try to revisit that issue and submit a PR, but I can't promise it will be any time soon.

With PopperJS you can pass either a element from DOM or a reference Object.

This library uses coordinates from text, so we need a referenceObject instead of a DOM element.

If you are interested, a starting point is this PopperJS doc and this Vue doc

Edit: Also this

fritx commented 5 years ago

@LouizFC thanks, including popper.js would be cool

LouizFC commented 5 years ago

@fritz just to confirm: the position of the popper is calculated and applied only in the "style" computed property, right?

Edit: by popper, I mean the auto-completion box