Better handling basic-dropdown parent for testing env (#1166) #1175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This try to fix
Cannot read property 'appendChild' of null
issue onpaper-menu
&paper-select
for ember > 3.17 when testing.I think related issues are :
The code of https://github.com/miguelcobain/ember-paper/blob/b7f13ad6137e456c53afa1bfda8ede0855e1a2d1/addon/utils/ebd-get-parent.js is inspired by what
ember-basic-drop-down
do : https://github.com/cibernox/ember-basic-dropdown/blob/850c227c0a58148056d55d41aa0e5d88656b8165/addon/components/basic-dropdown.js#L273-L290In addition to this PR, maybe I miss something, but :
From what I understand here, the reason
animateOut
exits onpaper-select
&paper-menu
is for animation & to handleisActive
🤔 .Plus, on paper-select, to keep the scroll position into the drop-down on animate out... (https://github.com/miguelcobain/ember-paper/blob/master/addon/components/paper-select/ebd-content/component.js#L71)
So we duplicate what
ember-basic-dropdown
already does (https://github.com/cibernox/ember-basic-dropdown/blob/v2.0.15/addon/components/basic-dropdown-content.js#L172-L184) "just" to handleisActive
& keep scroll... So we have to fix onember-paper
side an issue already fixed / wich does not exist inember-basic-dropdown
, right ?Wouldn't it be easier to only handle
isActive
by our own inpaper-select
&paper-menu
withdid-insert
&will-destroy
, as it is already done, make the scroll behavior "native" inember-basic-dropdown
(seems legit) & rely onember-basic-dropdown
for animation part 🤔