File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ function _registerMageforgeToolbar() {
3535 // ====================================================================
3636
3737 init ( ) {
38- const saved = localStorage . getItem ( 'mageforge-toolbar-collapsed-groups' ) ;
39- if ( saved ) {
40- try { JSON . parse ( saved ) . forEach ( key => this . collapsedGroups . add ( key ) ) ; } catch ( _ ) { }
41- }
38+ try {
39+ const saved = localStorage . getItem ( 'mageforge-toolbar-collapsed-groups' ) ;
40+ if ( saved ) {
41+ try { JSON . parse ( saved ) . forEach ( key => this . collapsedGroups . add ( key ) ) ; } catch ( _ ) { }
42+ }
43+ } catch ( _ ) { }
4244 this . createToolbar ( ) ;
4345 } ,
4446
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ function hasDirectText(el) {
9898function isVisible ( el ) {
9999 if ( el . offsetWidth === 0 && el . offsetHeight === 0 ) return false ;
100100 const style = getComputedStyle ( el ) ;
101- return style . visibility !== 'hidden' && style . display !== 'none' && style . opacity !== '0' ;
101+ return style . visibility !== 'hidden' && style . display !== 'none' && parseFloat ( style . opacity ) > 0 ;
102102}
103103
104104/**
You can’t perform that action at this time.
0 commit comments