File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
elements/pfe-primary-detail/src Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class PfePrimaryDetail extends PFElement {
153153 this . _detailsBackButton = this . shadowRoot . getElementById ( "details-wrapper__back" ) ;
154154
155155 this . _debouncedSetBreakpoint = null ;
156+ this . _windowInnerWidth ;
156157
157158 // @todo : decide if we need this anymore
158159 // Store all focusable element types in variable
@@ -302,6 +303,11 @@ class PfePrimaryDetail extends PFElement {
302303 * Then manage state of component and manage active/inactive elements
303304 */
304305 _setBreakpoint ( ) {
306+ // We don't need to do anything if the page width is unchanged
307+ if ( this . _windowInnerWidth === window . innerWidth ) {
308+ return ;
309+ }
310+
305311 const breakpointWas = this . breakpoint ;
306312 const breakpointIs = this . offsetWidth < this . breakpointWidth ? "compact" : "desktop" ;
307313
@@ -344,6 +350,8 @@ class PfePrimaryDetail extends PFElement {
344350 this . _setDetailsNavVisibility ( false ) ;
345351 }
346352 }
353+
354+ this . _windowInnerWidth = window . innerWidth ;
347355 }
348356
349357 /**
You can’t perform that action at this time.
0 commit comments