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

"Previewers" plugin dont work correctly with the "Line Numbers" #1496

Closed
Alxndr6eo1yG8Lv8AJ0TkliH6 opened this issue Jul 23, 2018 · 10 comments · Fixed by #1497
Closed

"Previewers" plugin dont work correctly with the "Line Numbers" #1496

Alxndr6eo1yG8Lv8AJ0TkliH6 opened this issue Jul 23, 2018 · 10 comments · Fixed by #1497

Comments

@Alxndr6eo1yG8Lv8AJ0TkliH6

The tooltip isnt aligned vertically.

prism js bug

link to CodePen

@RunDevelopment
Copy link
Member

Which browser are you using?

I can confirm this bug on FireFox, but not on Chrome.

@Alxndr6eo1yG8Lv8AJ0TkliH6 Alxndr6eo1yG8Lv8AJ0TkliH6 changed the title "Previewers" plugins dnot work correctly with the "Line Numbers" "Previewers" plugin dont work correctly with the "Line Numbers" Jul 23, 2018
@Alxndr6eo1yG8Lv8AJ0TkliH6
Copy link
Author

Alxndr6eo1yG8Lv8AJ0TkliH6 commented Jul 23, 2018

I use Firefox Developer Edition.

RunDevelopment added a commit to RunDevelopment/prism that referenced this issue Jul 24, 2018
@Alxndr6eo1yG8Lv8AJ0TkliH6
Copy link
Author

Now it works thanks!

This is my 1st time on githab. Do I need to click something because the problem is solved to me?

@RunDevelopment
Copy link
Member

How did you solve it?

@Alxndr6eo1yG8Lv8AJ0TkliH6
Copy link
Author

I downloaded a new script "Previewers"

@RunDevelopment
Copy link
Member

The one from my commit?

@Alxndr6eo1yG8Lv8AJ0TkliH6
Copy link
Author

Yes ( Fixed bug #1496 )

@RunDevelopment
Copy link
Member

Ok, thanks for the clarification.

This commit is not the final version yet, so I would like to ask you to wait until I publish the final version.
You can still use that commit, but be sure to update to the latest version of Prism once the final version has been included. (Likely in a few days)

@Alxndr6eo1yG8Lv8AJ0TkliH6
Copy link
Author

Thank you very much =)

@RunDevelopment
Copy link
Member

We will close the issue once the final bug fix has been include, so you can leave it open.

You're welcome ^^

mAAdhaTTah pushed a commit that referenced this issue Aug 19, 2018
The problem was a bug unique to Firefox which causes offsetTop of span.token
to always be 0 under certain conditions. It only occurred together with of the
line-number plugin because setting position: relative for the pre > code elements
triggers that FF bug.

The offset is now calculated using bounding boxes.

Tested in Chrome, Edge, IE, FF, and Opera.

Fixes #1496.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants