The regression here happens because the jsm code was looking into this.popup.clientWidth, which can be larger than this.popup.panelContent.clientWidth (which is the right thing to look at) on Linux (and on Windows after bug 1768278). However, this is all working around a weird HTML/XUL layout interaction (the buttons not wrapping correctly unless max-width is set, because XUL boxes don't understand when a child has flex layout). Instead, use display: block on the container and header. This prevents the weird layout interaction altogether and we can avoid the hacky workarounds. Differential Revision: https://phabricator.services.mozilla.com/D151139