8
0
فهرست منبع

Merge pull request #388 from ckeditor/t/ckedtor5/920b

Fix: The action should be executed upon the first click on a tooltip-enabled UI in iOS. Closes ckeditor/ckeditor5#920.
Piotrek Koszuliński 7 سال پیش
والد
کامیت
fbf76e98a6
1فایلهای تغییر یافته به همراه20 افزوده شده و 0 حذف شده
  1. 20 0
      packages/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css

+ 20 - 0
packages/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css

@@ -10,6 +10,26 @@
 @define-mixin ck-tooltip_enabled {
 	& .ck-tooltip {
 		display: block;
+
+		/*
+		 * Don't display tooltips in devices which don't support :hover.
+		 * In fact, it's all about iOS, which forces user to click UI elements twice to execute
+		 * the primary action, when tooltips are enabled.
+		 *
+		 * Q: OK, but why not the following query?
+		 *
+		 *   @media (hover) {
+		 *       display: block;
+		 *   }
+		 *
+		 * A: Because FF does not support it and it would completely disable tooltips
+		 * in that browser.
+		 *
+		 * More in https://github.com/ckeditor/ckeditor5/issues/920.
+		 */
+		@media (hover:none) {
+			display: none;
+		}
 	}
 }