Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent help popup to disappear when clicking on it #65741

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

GuillaumeGomez
Copy link
Member

Fixes #65736.

r? @kinnison

@JohnTitor
Copy link
Member

r? @Dylan-DPC

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2019
Comment on lines 384 to 394
var is_inside_help_popup = false;
do {
x = findParentElement(x, "DIV");
if (x) {
x = x.parentNode;
}
if (x && x.tagName === "ASIDE") {
is_inside_help_popup = true;
break;
}
} while(x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this entire loop be replaced with:

            var is_inside_help_popup = document.getElementById("help").contains(ev.target);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuillaumeGomez after making this change, ping me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kinnison Awesome! :o

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd not, I hadn't tested that, but I assume @GuillaumeGomez has.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm wondering about something, let me check it further!

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2019
@GuillaumeGomez
Copy link
Member Author

Updated!

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Oct 25, 2019

Please not merged, I need to check something! (I wonder if clicking on the background will dismiss the popup as expected with my last change...)

@GuillaumeGomez
Copy link
Member Author

So just like I thought, it didn't make the help popup disappear, I updated the code a bit.

@kinnison
Copy link
Contributor

Again, I can follow the JS and convince myself it ought to work, but I don't have a test environment right now to actually try it out, so a weak 👍 from me.

@GuillaumeGomez
Copy link
Member Author

r? @Dylan-DPC

@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 29, 2019

📌 Commit 863796b has been approved by Dylan-DPC

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 29, 2019
Prevent help popup to disappear when clicking on it

Fixes rust-lang#65736.

r? @kinnison
bors added a commit that referenced this pull request Oct 29, 2019
Rollup of 12 pull requests

Successful merges:

 - #65405 (Create new error E0742 and add long error explanation)
 - #65539 (resolve: Turn the "non-empty glob must import something" error into a lint)
 - #65724 (ci: refactor pr tools job skipping)
 - #65741 (Prevent help popup to disappear when clicking on it)
 - #65832 (Re-enable Emscripten's exception handling support)
 - #65843 (Enable dist for MIPS64 musl targets)
 - #65898 (add basic HermitCore support within libtest)
 - #65900 (proc_macro: clean up bridge::client::__run_expand{1,2} a bit.)
 - #65906 (Update mdbook to 0.3.3)
 - #65920 (Use rustc-workspace-hack for rustbook)
 - #65930 (doc: use new feature gate for c_void type)
 - #65936 (save-analysis: Account for async desugaring in async fn return types)

Failed merges:

 - #65434 (Add long error explanation for E0577)

r? @ghost
@bors bors merged commit 863796b into rust-lang:master Oct 29, 2019
@GuillaumeGomez GuillaumeGomez deleted the help-popup branch October 30, 2019 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Click event badly handled in tip popup in rustdoc
5 participants