Fix Help menu display bug - Task-1211 #5214
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
./python-format.sh
to make sure that your code lints and that you've followed our coding styleNotes
watchOutsideClose()
was called whenever theHelpBubble
was clicked and displayed the Help Resources popup content. This added a click handler (outsideClickHandler
) that checked if the click event happened on any of the elements in the popup content. If a click event matched the conditions specified, it would trigger theclose()
function.The bug was due to the fact that clicks on the
HelpBubble itself
were not being excluded. This means that even if the user clicked on theHelpBubble
in order to open the popup, it would register as an "outside click" and close the popup. This fix ensures that the popup will only close if the click occurs outside the entireHelpBubble
component.Note: this behavior was only triggered when there are no notifications because
watchOutsideClose()
is only called when there are no active in-app messages. This explains why the Help menu is displayed onkf.beta
due to a notification message being present.Testing
main
and try clicking on the Help button in the lower left-hand corner.esc
key closes the popup.X
closes the popup.