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

The tooltips are slightly disconnected from pointing triangles in certain environments #5821

Closed
mlewand opened this issue Nov 26, 2019 · 3 comments · Fixed by #12262
Closed
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:theme-lark squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@mlewand
Copy link
Contributor

mlewand commented Nov 26, 2019

The tooltips are slightly disconnected from pointing triangles in certain environments

📝 Provide detailed reproduction steps (if any)

I just noticed that the tooltip body is slightly disjointed from the pointer.

✔️ Expected result

The tooltip pointer should be aligned without spacing.

❌ Actual result

This is how it looks on Chrome78 @ win10:

Chrome

I went to Firefox to check if it's browser dependent, and seems like it is. Here's the screenshot from Firefox:

Firefox

📃 Other details

I believe the display settings are critical here.

I'm using window.devicePixelRatio = 2.5 (3840x2160 resolution).

It looks correct in the same browsers in lowDPI environments.

  • Browser: Any
  • OS: Win10
  • CKEditor version: 15.0.0

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@mlewand mlewand added type:bug This issue reports a buggy (incorrect) behavior. domain:ui/ux This issue reports a problem related to UI or UX. status:confirmed labels Nov 26, 2019
@mlewand mlewand added this to the backlog milestone Nov 26, 2019
@oleq
Copy link
Member

oleq commented Nov 26, 2019

It's been a while since I started seeing it but I was too lazy to fix this :P

It's probably a regression (but old) and I could be the same fix as for blurry dropdowns could address this issue ckeditor/ckeditor5-ui#529.

@oleq
Copy link
Member

oleq commented Nov 26, 2019

A quick check and the following seems to address the problem:

diff --git a/theme/ckeditor5-ui/components/tooltip/tooltip.css b/theme/ckeditor5-ui/components/tooltip/tooltip.css
index 93e3172..e4dd6e5 100644
--- a/theme/ckeditor5-ui/components/tooltip/tooltip.css
+++ b/theme/ckeditor5-ui/components/tooltip/tooltip.css
@@ -12,12 +12,6 @@
 .ck.ck-tooltip {
          left: 50%;

-         /*
-          * Prevent blurry tooltips in LoDPI environments.
-          * See https://github.com/ckeditor/ckeditor5/issues/1802.
-          */
-         top: 0;
-
          /*
           * For the transition to work, the tooltip must be controlled
           * using visibility+opacity. A delay prevents a "tooltip avalanche"
@@ -58,8 +52,7 @@
           *     +-----------+
           */
          &.ck-tooltip_s {
-                  bottom: calc(-1 * var(--ck-tooltip-arrow-size));
-                  transform: translateY( 100% );
+                  top: calc(100% + var(--ck-tooltip-arrow-size));

                   & .ck-tooltip__text::after {
                            top: calc(-1 * var(--ck-tooltip-arrow-size));
@@ -79,8 +72,7 @@
           *       [element]
           */
          &.ck-tooltip_n {
-                  top: calc(-1 * var(--ck-tooltip-arrow-size));
-                  transform: translateY( -100% );
+                  bottom: calc(100% + var(--ck-tooltip-arrow-size));

                   & .ck-tooltip__text::after {
                            bottom: calc(-1 * var(--ck-tooltip-arrow-size));

@dufipl
Copy link
Contributor

dufipl commented Aug 22, 2022

The issue looks like not reproducing on master anymore.

@CKEditorBot CKEditorBot added this to the iteration 56 milestone Aug 22, 2022
@mlewand mlewand added the squad:features Issue to be handled by the Features team. label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:theme-lark squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants