Drilldown height calculation with long titles #8320
Merged
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.
The Drilldown plugin reads the height of each menu inside of it, and sets the height of the whole menu to match the tallest one. However, the calculated height will be wrong if any menu items differ in height, as reported in #7070.
This is because the total menu height is calculated by taking the height of the first item in the list, and multiplying it by the number of items in the menu.
This change instead just calculates the height of the entire menu all at once, so it will be accurate.
However, the call to
.getBoundingClientRect()
manages to be inaccurate. In the test case I put together, the height calculated is always off by 10 pixels, and I'm not sure why.To finish this fix, we need the height calculated accurately.