From fe9fb6dbbdea51337b04da7da287c40b6c6fd89b Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Wed, 9 May 2018 16:33:32 +0200 Subject: [PATCH] Fix: The action should be executed upon the frist click on a tooltip-enabled UI in iOS. Closes ckeditor/ckeditor5#920. --- theme/components/tooltip/mixins/_tooltip.css | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/theme/components/tooltip/mixins/_tooltip.css b/theme/components/tooltip/mixins/_tooltip.css index 175f55c3..74c3bc63 100644 --- a/theme/components/tooltip/mixins/_tooltip.css +++ b/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; + } } }