added advanced handling of the attachment width - now depending on the menu open/hidden state