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

Toolbar positioning in inline mode set with decimal values results in blurred svg icons #4730

Closed
ilant opened this issue Jan 2, 2019 · 7 comments

Comments

@ilant
Copy link

ilant commented Jan 2, 2019

It's a bug in the last TinyMCE Beta version, and the last Mozilla (main and developer versions)

Using Inline version for editing, when the toolbar get positioned with decimal values (screenshot), the icons are blurred.

2019-01-02_190736
2019-01-02_190656

@alecpl
Copy link
Contributor

alecpl commented Feb 5, 2019

Icons are blurred in Firefox also for normal editor mode e.g. at https://www.tiny.cloud/. There's no issue in Chrome. Changing the button's margin like .tox .tox-tbtn { margin: 2px 0; } fixes this, but only for first line of the toolbar. It does not work when the toolbar has more lines. So, that's not the way to go.

@lnewson
Copy link
Contributor

lnewson commented Feb 25, 2019

This issue should now be fixed in 5.0.1, as the inline toolbar now ensures it isn't positioned using fractional pixels. Please let us know if you find any further problems!

@alecpl
Copy link
Contributor

alecpl commented Feb 25, 2019

@lnewson Not fully fixed. Using Firefox visit https://www.tiny.cloud/ and set screen width to 760px. Strange thing is this depends on the position of the menubar in the whole page not inside the editor. If you drag the screen and resize it the icons' sharpness will change. I'm not sure this will be something fixable or it's a Firefox issue we have to live.

@lnewson
Copy link
Contributor

lnewson commented Feb 25, 2019

@alecpl that page isn't using 5.0.1, it's still on 5.0.0. However in saying that, we are aware of a separate issue to this that can produce fuzzy icons for any mode of the editor, not just inline (which is what I think you're referring to).

@alecpl
Copy link
Contributor

alecpl commented May 23, 2019

This is not fixed. Problem exists if the whole editor element is positioned on a sub-pixel. I've found a better solution in https://stackoverflow.com/questions/26554832/keep-svg-element-on-exact-pixel:

.tox-icon {
     transform: translate(0, 0);
}

@lnewson
Copy link
Contributor

lnewson commented May 23, 2019

@alecpl as I said above that's a different issue, for which we have an internal issue already logged (though it is somewhat related). As for the suggestion, we investigated that originally and determined it's not a viable solution because a) it doesn't work on all browsers (eg IE) and b) causes the icons to be mispositioned, such that the icons are no longer center aligned.

@lnewson
Copy link
Contributor

lnewson commented Jun 12, 2019

@alecpl just as a heads up, looks like Firefox 68 has fixed the root cause of the SVG's being rendered blurry: https://bugzilla.mozilla.org/show_bug.cgi?id=608812 So once that's released, the issue you mentioned should only impact IE users I believe.

Note: I tested Firefox 68 Beta, since Firefox 68 isn't scheduled to be released to stable until early July at this stage.

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

No branches or pull requests

4 participants