sydcanem / bootstrap-contextmenu

Context menu plugin for Twitter's Bootstrap framework
http://sydcanem.com/bootstrap-contextmenu/
645 stars 193 forks source link

Safari on OSX #91

Open razor-1 opened 9 years ago

razor-1 commented 9 years ago

I recently started noticing an issue, on Safari 8.0.6 with OSX 10.10.3. The contextmenu pops up and immediately disappears. Upon debugging it looks like another click is being registered just outside the contextmenu itself. If you hold the mouse down and drag the cursor into the menu area it will work normally, but just clicking causes it to disappear right away.

razor-1 commented 9 years ago

Changing to use pageX and pageY to calculate position fixes this. So probably some additional logic is needed in show() to work around whatever the Safari issue is. Maybe all the code in show() could just run if position is fixed on the menu, and otherwise keep it simple with pageX and pageY?

razor-1 commented 9 years ago

Actually, I think it has to do with control-click to right-click. Safari fires both a contextmenu and a click with ctrlKey set on a control-click. If this project is not abandoned, which it appears it is as no pull requests have been approved in some time, I can provide a simple fix.

ricaragao commented 7 years ago

Hi @razor-1 , what fix did you do to this issue?

razor-1 commented 7 years ago

@ricaragao you can look at commit e161a0cec2605c73bc5b021e74f974d4876af1ef from razor-1/bootstrap-contextmenu to see how.