         scrollView.translatesAutoresizingMaskIntoConstraints = false
         scrollView.delegate = self
 
+        updateScrollViewInsets()
+    }
+
+    func updateScrollViewInsets() {
         // Add padding at the end to account for overflow button
         let layoutDirection = UIView.userInterfaceLayoutDirection(for: semanticContentAttribute)
         switch layoutDirection {
         case .leftToRight:
-            scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: Constants.stackButtonWidth)
+            scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: trailingInset)
         case .rightToLeft:
-            scrollView.contentInset = UIEdgeInsets(top: 0, left: Constants.stackButtonWidth, bottom: 0, right: 0)
+            scrollView.contentInset = UIEdgeInsets(top: 0, left: trailingInset, bottom: 0, right: 0)
         }
     }
 

                item.addTarget(self, action: #selector(handleButtonTouch), for: .touchDown)

                trailingItemContainer.addArrangedSubview(item)
            }

            updateOverflowToggleItemVisibility()

        return frame.width - scrollView.contentInset.left - scrollView.contentInset.right
    }

    fileprivate var trailingInset: CGFloat {
        if let trailingItem = trailingItem {
            trailingItem.sizeToFit()
            return trailingItem.bounds.size.width + Constants.trailingButtonMargin
        } else {
            return Constants.stackButtonWidth
        }
    }

    /// Returns true if any of the overflow items in the bar are currently hidden
    ///
