Created by: ysds
Fixes #25388 (closed) and fixes #25664 (closed) (https://github.com/philipwalton/flexbugs#flexbug-17)