User tests: Successful: Unsuccessful:
Pull Request for Issue #10821
Changed the default delay times for the show
and hide
events for Bootstrap Tooltip to prevent fast hovering making them disappear.
Please note this is not a perfect PR, but it's the only approach I can think of. There's hardly any information about this issue so the only thing I can think of is it maybe being some sort of conflict with the likes of Mootools.
Bit hard to explain but those who have had the same issue will know. Go into the Joomla admin panel and continuously and rapidly move the cursor over an element that displays a tooltip. After hovering over the element about 5-10 times, move your mouse over it again and the tooltip won't display.
After applying the patch, do the same thing. It shouldn't cause the same issue due to the delay times.
/cc @ggppdk @creative3d
Category | ⇒ | JavaScript |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Oh do you mean instead of changing the bootstrap.min.js
?
yup
Category | JavaScript | ⇒ | Libraries |
@dgt41 - ok done but it's not parsing the Json object parameters correctly. Here is the var_dump
of the $options
:
Result: '{"html": true, "delay": "{show: 100, hide: 400}", "container": "body"}'
Expected: '{"html": true, "delay": {"show": 100, "hide": 400}, "container": "body"}'
@C-Lodder Travis fails now see: https://travis-ci.org/joomla/joomla-cms/jobs/153328882
1) JHtmlBootstrapTest::testTooltip
Verify that the tooltip script is initialised
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'jQuery(function($){ $(".hasTooltip").tooltip({"html": true,"delay": {"show": 100,"hide": 400},"container": "body"}); });'
+'jQuery(function($){ $(".hasTooltip").tooltip({"html": true,"container": "body"}); });'
/home/travis/build/joomla/joomla-cms/tests/unit/suites/libraries/cms/html/JHtmlBootstrapTest.php:388
@zero-24 - I can't see why Travis would fail.
@creative3d - Hmm odd, do you at least notice the delay the the tooltips when they disappear?
it looks like that the new code produce a different JS output.
-'jQuery(function($){ $(".hasTooltip").tooltip({"html": true,"delay": {"show": 100,"hide": 400},"container": "body"}); });'
+'jQuery(function($){ $(".hasTooltip").tooltip({"html": true,"container": "body"}); });'
Yes, that's because there should be. We're now setting a default delay value ;)
Do I need to update the Unit tests?
If it is an indent change yes.
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
|
@C-Lodder I think I noticed the delay, but the issue is still noticed too, with 447 line and 454 line :(
I'm moving mouse around an element in a circle fast, then from the left to right, right to left, and when I stop in the center, the tooltip appear one time and instantly disappear (usually)
Was it fixed in Bootstrap 3? How was it fixed there? Can it be applied here?
P.S. Don't know if you know, you may also install NoNumber tooltips to use with articles, I attached you a table with elements, each element uses a NN tooltip. It works the same as in admin panel. Maybe it'll help to test...
katakana.txt
Yup, I believe this was fixed in Bootstrap 3.3.0.
I'll look at the patch and try implementing it.
I've just googled "bootstrap 3 tooltip example". The first example with Bootstrap 3.3.7 worked fine! (I did, however, manage to brake it :) but it restored itself on the next hover)
I've now applied the patch from BS3.
Still not perfect but it's all I can do really.
cc/ @creative3d @zero-24
Well, it still breaks, but with delay and that fix, it's more difficult to break it...
I'll try to see if users notice the difference after I implement these changes.
Here is an example which works perfect without any delays: BS 3 example
P.S. When Joomla is going to use BS 3? Is it a difficult change for Joomla? Will we need to change templates with this change?
It will be a massive change that will take months of development and testing. It won't happen for J3.x but will for 4.x
@C-Lodder since the code from v3 didn't solve the problem I would suggest to close this, with a remark won't fix as it is totally related to bs2.3.2 which is outdated and in few months joomla 4 will not use that any more. Maybe a better approach is to try and find a way to move from 2.3.2 to 3, part of it is #11654
Don't spent your precious time on bugs that will be cured by flipping the bs version. My 2cents
@creative3d there are few ppl working on that. Eg with #11654 I demonstrate a way to decouple the bootstrap js from the php (the html coupling can't be undone, but it can be overridden)
@dgt41 - Yup, you're right. I'm not going to start stripping down the Tooltips when, like you said, J4.x is going to start happening in the not too distant future.
I'll leave this up to the powers to decide whether the delay (which helps but does not fully fix the issue) should be merged.
and you are the only person ever to report this
On 24 August 2016 at 15:22, creative3d notifications@github.com wrote:
@dgt41 https://github.com/dgt41, "in few months joomla 4" - it that
really "few months"? It's just this bug's been for 2 years, few months are
nothing in comparison, but I haven't seen any information about J4.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11661 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8YLmOd1VSgZSHn6cC2nl_hKieFXhks5qjFO9gaJpZM4Jnpjk
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
It's because some administrators delete or close topics which they don't understand.
@creative3d can you show me one of your issues that was closed without a good reason, as I can't find it?
@creative3d - This is a Bootstrap 2 issue, NOT a Joomla issue, therefore it is not up to us to fix it. We're simply powering the CMS with a 3rd party framework.
I've tried to come up with a fix for you and others who may have had the same issue. It does not fix it but makes it better than before. The fact being is that J4.x is in the planning and it will be a major release. Major releases are the only time B/C breaks like updating Bootstrap can be made. It's going to take time, but it WILL happen
I think we need to ask those who experienced the bug before if it should be merged
Except it doesn't work that way at all. If this patch isn't fixing the issue (or I guess improving the conditions it takes to experience it if I'm following things right), then it shouldn't be merged. That's why we require human testing on all patches and shouldn't be merging things based on popularity.
We dont merge based on popularity or how loud someone shouts
On 24 August 2016 at 16:17, Michael Babker notifications@github.com wrote:
I think we need to ask those who experienced the bug before if it should
be mergedExcept it doesn't work that way at all. If this patch isn't fixing the
issue (or I guess improving the conditions it takes to experience it if I'm
following things right), then it shouldn't be merged. That's why we require
human testing on all patches and shouldn't be merging things based on
popularity.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11661 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ZwODIf1lx7ASoc1pxJLkS8kqtQ8ks5qjGBygaJpZM4Jnpjk
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Right now I'm playing with a tooltip and can't break it. So, consider it as a full fix, not an improvement.
I see the bug several times per day,
especially since recently i was making changes to the language strings and i had to review the tooltips ...
you can try to force it to appear by going over an element that has a tooltip,
also you can see it rarely if the mouse is over the element while page is loading , it is a "race-condition" issue show and hide fired handlers run simultanuesly, whichever finishes last wins ... and if wrong one wins you go into a bad state ...
This PR has 2 changes,
the 1st change that adds delay 100ms to show and 400ms to hide is annoying, but it does make the bug a lot more difficult to appear (makes it 5x or 10x more rare), still since it introduces an annoying delay this is tradeoff, and not a fix ...
the 2nd change is something that is nice and it is not a trade-off, before the patch, if you trigger the bug you need to find a DIFFERENT element with a tooltip, hover it and then GO BACK to the other element that the tooltips is not showing,
with this 2nd change you do not need to find such an element, you can move out and back over the element and the tooltip will appear,
https://github.com/joomla/joomla-cms/pull/11661/files#diff-38878f657eb0a1c6fe9d820f59dc9bf4R1187
I will just post my opinion here a bit more clear:
Why?
We are patching BS files
Sadly that argument holds zero weight since the project hacked the BS files years ago.
Tooltips on hover is a HELL NO from UX/UI perspective since the introduction of touch devices
a hover on PC, and a "touch" on touch devices, I've checked on a mobile, also works better for me.
@creative3d I am curious: how exactly do you recognise which labels/elements have a tooltip, or you randomly touch the screen till something comes up?
@creative3d and also how do you manage to reveal tooltips on clickable elements (a, btn, etc):
a hover on PC, and a "touch" on touch devices, I've checked on a mobile, also works better for me.
NO IT'S NOT WORKING OK
Listen, for me the issue is solved, I'm really greatful to @C-Lodder, a 2 year bug was fixed. No one wanted to listen to me, but he did. If you want to leave the bug for another 2 years, that's your call. I don't understand such a decision, but it's not my business, I'm just a user, not a developer. It was hard for me to get through all this bureaucracy here when messages are ignored and some moderators put themselves above other people...
Good bye!
From Russia with love :)
Closing as this simply isn't going anywhere
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-04 14:14:19 |
Closed_By | ⇒ | C-Lodder |
@C-Lodder you are changing external library file here, you could do:
$opt['delay'] = isset($params['delay']) ? (is_array($params['delay']) ? $params['delay'] : (int) $params['delay']) : { show: 100, hide: 400 };
in
libraries/cms/html/bootstrap.php