Fix menu shakiness when over-scrolling in Chrome and Safari on MacOS.

Merges [30844] to the 4.1 branch.

See #30692.

Built from https://develop.svn.wordpress.org/branches/4.1@30917


git-svn-id: http://core.svn.wordpress.org/branches/4.1@30907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve the fix for menu shakiness when over-scrolling. Recalculate heights on editor auto-resize.

Merges [30852] to the 4.1 branch.

See #30692.

Built from https://develop.svn.wordpress.org/branches/4.1@30918


git-svn-id: http://core.svn.wordpress.org/branches/4.1@30908 1a063a9b-81f0-0310-95a4-ce76da25c4cd