Hi there, I made this post requesting settable border size for PopupMenus and the feature got added. I was making use of the feature when I discovered that setting the border size to 0 causes popup menus to be instantly closed upon opening in a certain case: when the popup menu is opened with a mouse button and is shown at the mouse position (the default).
When you press the mouse button down, it opens the popup menu. If the border size is 0, then when the popup menu opens, the mouse’s starting position is over the first item. And then when the right mouse button gets released, it interprets that as a click and selects the first item.
If the border size is 1 or more, the mouse’s starting position is on the border, so the popup menu remains open.