Left mouse click on the conflict resolution method of of to prevent bubbling

  • 2020-03-30 02:57:43
  • OfStack

I realized two kinds of right click menu in a page, when the left mouse button to click the space, right click menu is not hidden. So Google finally found a way to change the left-click event to:
<span style="font-size:24px;">$(document).click( function () { 

Instead of
<span style="font-size:24px;">$(document).on('click touchstart', function () { 

Problem solving.

Related articles: