AdminLTE - Free admin dashboard template based on Bootstrap 5
fix(js): toggle d-none for fullscreen icons instead of inline display (#6021)
The fullscreen plugin was setting iconMaximize.style.display = 'block'
and 'none' directly. Hardcoding 'block' overrode whatever display value
the icon library uses naturally -- Bootstrap Icons happen to be inline
(so the bug was invisible by default) but FontAwesome uses inline-block,
and the forced 'block' shifted the icon position after the first click.
Switches the plugin to toggle Bootstrap's .d-none utility class, which
preserves the icon library's own display value:
// before
iconMaximize.style.display = 'block'
iconMinimize.style.display = 'none'
// after
iconMaximize.classList.remove('d-none')
iconMinimize.classList.add('d-none')
Updates the topbar markup and the documentation snippet to match: the
initial-hidden minimize icon now uses class="d-none" instead of
style="display: none;" so the JS toggle is symmetric.
Works correctly across any icon library. A
Aigars Silkalns committed
dba190ae8f034a3e46f8ca9c131a696ccbf50e16
Parent: 9941733