Replying to [comment:16 spjonez]:
The original fix for #10144 prevented the event. I don't follow your Git repo to know when or what version the selection save/restore code was added or for what purpose. The original plugin did support keypress to select and did not flicker the selection when accessing the menu as focus was not called on click so no save/restore was needed.
git blame or using GitHub's blame will tell you why it changed. See #10639.
> Keypress on what? Any element in the document? Keypress on the menu while it's open. I have not looked into how the original did this I'm assuming you'd know more since your version is based on it?
The menu isn't receiving keypresses if focus isn't changed. This is exactly what I've been saying over and over.
Focus has to be set to the button in order for anything to work. Clicking the button is causing the focus to move and the selection to clear. We're restoring the selection, which is then killing the focus on the button in some browsers. So we then have to fix the focus, which is now stupidly killing the selection in Safari. It's become a vicious cycle. Preventing the default behavior of mousedown prevents focus from moving, which caused a regression. No matter how many times you ask us to just not set focus, that will not be an acceptable solution.