File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
app/code/Magento/PageBuilder/view/frontend/web/js/content-type/buttons/appearance/inline Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,20 @@ define([
16
16
var buttonMinWidth = 0 ;
17
17
18
18
buttonList . each ( function ( ) {
19
- var buttonWidth = this . querySelector ( '[data-element="link"]' ) . offsetWidth ;
19
+ var buttonWidth = this . offsetWidth ;
20
20
21
21
if ( buttonWidth > buttonMinWidth ) {
22
22
buttonMinWidth = buttonWidth ;
23
23
}
24
24
} ) ;
25
- buttonList . each ( function ( ) {
26
- this . querySelector ( '[data-element="link"]' ) . style . width = buttonMinWidth + 'px' ;
27
- } ) ;
25
+ buttonList . css ( 'width' , buttonMinWidth ) ;
28
26
} ;
29
27
30
28
return function ( config , element ) {
31
29
var $element = $ ( element ) ;
32
30
33
- if ( $element . attr ( 'data-same-width ') === '1' ) {
34
- equalizeButtonWidth ( $element . children ( ) ) ;
31
+ if ( $element . data ( 'sameWidth ') === '1' ) {
32
+ equalizeButtonWidth ( $element . find ( '[data-element="link"]' ) ) ;
35
33
}
36
34
} ;
37
35
} ) ;
You can’t perform that action at this time.
0 commit comments