Skip to content

Commit

Permalink
Merge pull request #6060 from melloware/PR6055
Browse files Browse the repository at this point in the history
Fix #6055: DomHandler incorrect case for computed styles
  • Loading branch information
nitrogenous authored Mar 18, 2024
2 parents 2cf4c38 + eb6cdad commit f39d2f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/utils/DomHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ export default class DomHandler {
let styleDeclaration = node ? getComputedStyle(node) : null;

return (
styleDeclaration && (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')))
styleDeclaration && (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflow-x')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflow-y')))
);
};

Expand Down Expand Up @@ -772,9 +772,9 @@ export default class DomHandler {
}

static scrollInView(container, item) {
let borderTopValue = getComputedStyle(container).getPropertyValue('borderTopWidth');
let borderTopValue = getComputedStyle(container).getPropertyValue('border-top-width');
let borderTop = borderTopValue ? parseFloat(borderTopValue) : 0;
let paddingTopValue = getComputedStyle(container).getPropertyValue('paddingTop');
let paddingTopValue = getComputedStyle(container).getPropertyValue('padding-top');
let paddingTop = paddingTopValue ? parseFloat(paddingTopValue) : 0;
let containerRect = container.getBoundingClientRect();
let itemRect = item.getBoundingClientRect();
Expand Down

0 comments on commit f39d2f3

Please sign in to comment.