question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sidebar - fa fa-angle-left pull-right inside treeview broken after update from 2.3.3 to 2.3.5

See original GitHub issue

Firstival - thank you for you work!

I use newest cdnjs version of AdminLTE css, same thing happen in 2.3.4 . It looks, like this part is missing

.sidebar-menu li > a > .pull-right {
    margin-top: -7px;
    position: absolute;
    right: 10px;
    top: 50%;
}

And here’s the screenshot:

zrzut ekranu 2016-07-25 o 15 20 08

I can’t track myself what has changed. Best regards!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
michaelarnautscommented, Jul 29, 2016

This can be solved by wrapping the icon in a <span class="pull-right-container">, and keeping pull-right on the icon itself. Actually, I think this is the recommended solution since the examples are also modified like this.

3reactions
ByteHuntercommented, Jul 26, 2016

I have the same issue and, indeed there is a part missing. In a recent mergue request #1006 the .pull-right class was replaced by .pull-right-container which I think has a little sense. If you don’t use multiple labels you may want to keep it simple by just specifying .pull-right to the <i> element.

The problem was reagarding a visual glitch in Firefox (which I could reproduce with my current browser’s version 47.0.1) where multiple labels are not being displayed correctly: issue1134-multiple_labels_problem issue1134-multiple_labels_problem-2

Solution

If you don’t use multiple labels consider this workaround (example of a fully dropdown menu):

<li class="treeview">
    <a href="#">
        <i class="fa fa-coffee"></i> 
        <span>Menu</span> 
        <i class="fa fa-angle-left pull-right-container"></i>
    </a>
    <ul class="treeview-menu">
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 1</a></li>
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 2</a></li>
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 3</a></li>
    </ul>
</li>

Note that I added the -container to pull-right css class inside the Font Awesome icon.

And this will fix this visual glitch. issue1134-working Working expanded as well. issue1134-working-expanded

If you want to add multiple labels, with this change you have to do it enclosing all of them inside a .pull-right-container, like this:

<li>
    <a href="#">
        <i class="fa fa-coffee"></i> <span>Menu</span>
        <span class="pull-right-container">
            <span class="label label-success">10</span>
            <span class="label label-warning">20</span>
            <span class="label label-danger">30</span>
        </span>
    </a>
</li>

Which will produce: issue1134-multiple-labels

However, if you still want all these features (dropdown’s caret and multi-label) consider enclosing them all in the .pull-right-container, like the following snippet:

<li class="treeview">
    <a href="#">
        <i class="fa fa-coffee"></i> 
        <span>Menu</span> 
        <span class="pull-right-container">
            <span class="label label-success">10</span>
            <span class="label label-warning">20</span>
            <span class="label label-danger">30</span> 
            <i class="fa fa-angle-left"></i>
        </span>
    </a>
    <ul class="treeview-menu">
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 1</a></li>
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 2</a></li>
        <li><a href="#"><i class="fa fa-circle-o"></i> Submenu 3</a></li>
    </ul>
</li>

The result will be: issue1134-treeview_and_multilabel

I’m not a big fan of this change, since I personally didn’t use multiple labels. And single labels worked perfectly fine, as well as dropdown’s caret. If there is no way to easily fix this issue in Firefox, both css classes (.pull-right and .pull-right-container) should be kept to handle both cases and to not break all people’s implementations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fa fa-angle-left pull-right inside treeview broken after update ...
I use newest cdnjs version of AdminLTE css, same thing happen in 2.3.4 . It looks, like this part is missing .sidebar-menu li...
Read more >
adminLTE 2.4.5 treeview not working properly after refresh ...
I'm using adminLTE 2.4.5 version in rails 5.2.2 version. All files I'm loading, all adminLTE assets from the vendor folder, all UI is...
Read more >
AdminLTE 2 | Documentation
It is a responsive HTML template that is based on the CSS framework Bootstrap 3. It utilizes all of the Bootstrap components in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found