The mouseout code triggers the hiding of the popup, but it was previously in the popupEditFn meaning that it ran before we expected the popup to close, which caused this race condition. I also had to tweak the contextmenu test because it was depending on a mousedown/click which we are no longer listening for (we replaced that with mouseover/mouseout).
MozReview-Commit-ID: 5mZujGuto5g
--HG--
extra : transplant_source : %A6X%9A%40%FD%7C%5C%F2gC%B1%1Bv%CF%F4%D5%B7%26q%7E