0

... when inserted dynamically. I would not have intuited this, and find it hard to believe this is expected behavior, but when I dynamically insert list elements by changing their display with JavaScript, they display out of order. This pic sums it up.

Is this expected or a bug?

enter image description here

Code that matches the display type:

    Backbone.on('user_sign_in', function () {
        $A.log('user_sign_in event')
        if (getComputedStyle(self.E.main_nav, null).display === 'block') {
            self.E.user_menu.style.display = "block";
        } else {
            self.E.user_menu.style.display = "inline-block";
        }
    });

One solution causes this issue:

enter image description here

cade galt
  • 3,843
  • 8
  • 32
  • 48