Closed houfeng0923 closed 4 years ago
ember-popper component is ember component and use didRender, ref modifier is not expected work usually, component only set ref dom Node after didRender, not the dom inserted .
didRender
ref
so, when didRender execute in https://github.com/kybishop/ember-popper/blob/master/addon/components/ember-popper-base.js#L163 , _popperElement is undefined , if we use #in-element (for example tooltip ui), it will show in a default position (maybe the top left corner), after ref modifier install , _popperElement set run , it relocation to right position.
_popperElement
set
the old version https://github.com/kybishop/ember-popper/blob/v0.9.2/addon/components/ember-popper-base.js#L272 is work well
I've encountered what I believe is the same issue, albeit showing up in a slightly different scenario.
Here's a PR that fixes the problem: #127
ember-popper component is ember component and use
didRender
,ref
modifier is not expected work usually, component only set ref dom Node after didRender, not the dom inserted .so, when didRender execute in https://github.com/kybishop/ember-popper/blob/master/addon/components/ember-popper-base.js#L163 ,
_popperElement
is undefined , if we use #in-element (for example tooltip ui), it will show in a default position (maybe the top left corner), after ref modifier install , _popperElementset
run , it relocation to right position.the old version https://github.com/kybishop/ember-popper/blob/v0.9.2/addon/components/ember-popper-base.js#L272 is work well