In the current implementation, the anchorEl is always covered by the menu that it opens,
and therefore cannot be clicked. When styles are passed in to override that behavior, the anchorEl
closes then reopens the menu by firing onClose then flipping the open value in state.
This changes that behavior so that the menu will stay closed by preventing the onClose method from being fired when the anchorEl is clicked.
In the current implementation, the
anchorEl
is always covered by the menu that it opens, and therefore cannot be clicked. When styles are passed in to override that behavior, theanchorEl
closes then reopens the menu by firingonClose
then flipping theopen
value in state.This changes that behavior so that the menu will stay closed by preventing the
onClose
method from being fired when theanchorEl
is clicked.