I was using Prosemirror with Bootstrap. However, due to some styles conflict, after refreshing the window, the toolbar of menu expands vertically. When I looked up in the source code, it appears that DOM sets the minHeight property of menubar dynamically according to some logic that depends on maxHeight.