jquery – Long contextual help needs two clicks to close

Question

In our plugin, we are using enough contextual help on one page that you have to scroll to reach the “Help” button (#contextual-help-link”) to close it again. When this happens (or in fact, if I scroll before clicking on the “Help” button to close the section even if there isn’t a lot of text), then the first attempt to close the section fails. A second click on the “Help” button then successfully closes it.

Is there a way to prevent having to click “Help” twice to close the open section?

Further notes: I have a live expression for document.activeElement in the console. On the first attempt to close the section, the document.activeElement shows:

button#contextual-help-link.button.show-settings.screen-meta-active

on the second, click it shows:

button#contextual-help-link.button.show-settings

0
Mike C 5 months 2022-03-07T14:26:11-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse