Skip to content

Commit

Permalink
Fix primefaces#6055: DomHandler incorrect case for computed styles
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Feb 29, 2024
1 parent a2a2f11 commit 0ed7712
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 0ed7712

Please sign in to comment.