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

Fix css scrolbar issues with copy button #4508

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Mar 23, 2023

image

Closes #4506

@jorg-vr jorg-vr added the bug Something isn't working label Mar 23, 2023
@jorg-vr jorg-vr self-assigned this Mar 23, 2023
@jorg-vr jorg-vr marked this pull request as ready for review March 23, 2023 16:39
@jorg-vr jorg-vr requested a review from a team as a code owner March 23, 2023 16:39
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team March 23, 2023 16:39
const copyButton = new CopyButton();
copyButton.codeElement = codeElement;

render(copyButton, codeElement.parentElement, { renderBefore: codeElement });
initTooltips(codeElement);
Copy link
Member

Choose a reason for hiding this comment

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

initTooltips is not called anymore? Is this related to the scrollbar issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not related to the issues, but the code does not do anything anymore. This code stems from the time the copy button was rendered inside the codeElement and I only initialized the tooltips once.

The copy button now calls initTooltips after every update (Which is required because the tooltip content might have changed)

@jorg-vr jorg-vr merged commit e7446af into develop Mar 27, 2023
@jorg-vr jorg-vr deleted the fix/copy-code-bugs branch March 27, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix css positioning of copy button
3 participants