- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.7k
Correct Bootstrap tooltip positioning for top and bottom options #5137
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
Conversation
| This is redone now to use only css/less changes. Kudos for this goes to Seth @nternetinspired ! To test this one apply #5113 and #5112
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default in a LTR document, it shouldn't need to be specified.
| Did you try setting only labels with the tooltip class to inline-block, as proposed in #5130 (comment), rather than targeting the .control-label? I'd like to propose an alternative, which should resolve this issue on any form type (vertical, horizontal or any other) and needs to be specified only once; I believe that would be the optimal solution because; 
 | 
| @nternetinspired I guess I misinterpreted your first comment. Correction on its way. You re right, let’s not mess the bootstrap less file. Shall I put In forms.less or in every template.less file? | 
| Sorry if I wasn't clear and thanks for making these changes :) My concern is with altering key properties of a widely used utility class like .form-control. I think that Joomla's .control-label should contain the same properties, and behave the same, as Bootstrap's .control-label so we shouldn't alter it directly IMO. Your original changes affected that class directly which is why I recommended scoping it with an additional class, so there can be no crossover with Bootstrap (who don't use the .hasTooltip class). I'm personally not so concerned which file that addition lives in, though forms.less would seem a sensible choice. | 
| +1 Tested successfully. Thanks for fixing @DGT41 :) | 
| @smanzi Sergio can you test this one? | 
| @test success | 
| Thanks - setting RTC | 
| Merged into staging - thanks! | 
Bootstrap tooltips don’t behave nicely
This is a response to issue #5130

Moving away from mootools introduce a nice glitch of bootstrap tooltips: their position for the options top and bottom is far from optimal:
On horizontal placement of a label:
And on vertical:

Here are the proposed placement with this PR:

Horizontal:
Vertical:

Tooltips render nicely even on small screens.
There is a change in text alignment on form-horizontal from right to left (the first two pictures illustrate this)