Skip to content

Commit c4d835d

Browse files
tomivirkkiclaude
andauthored
fix: prevent overflow override on scroller in split-layout (#11651)
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 75c5510 commit c4d835d

3 files changed

Lines changed: 33 additions & 4 deletions

File tree

packages/scroller/src/styles/vaadin-scroller-base-styles.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const scrollerStyles = css`
1515
--vaadin-scroller-overflow-indicator-top-opacity: 0;
1616
--vaadin-scroller-overflow-indicator-bottom-opacity: 0;
1717
display: block;
18-
overflow: auto;
18+
overflow: auto !important;
1919
outline: none;
2020
box-sizing: border-box;
2121
padding: var(--vaadin-scroller-padding-block) var(--vaadin-scroller-padding-inline);
@@ -30,15 +30,15 @@ export const scrollerStyles = css`
3030
}
3131
3232
:host([scroll-direction='vertical']) {
33-
overflow-x: hidden;
33+
overflow-x: hidden !important;
3434
}
3535
3636
:host([scroll-direction='horizontal']) {
37-
overflow-y: hidden;
37+
overflow-y: hidden !important;
3838
}
3939
4040
:host([scroll-direction='none']) {
41-
overflow: hidden;
41+
overflow: hidden !important;
4242
}
4343
4444
:host::before,

test/integration/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@
3636
"@vaadin/password-field": "25.2.0-alpha10",
3737
"@vaadin/popover": "25.2.0-alpha10",
3838
"@vaadin/radio-group": "25.2.0-alpha10",
39+
"@vaadin/scroller": "25.2.0-alpha10",
3940
"@vaadin/select": "25.2.0-alpha10",
4041
"@vaadin/side-nav": "25.2.0-alpha10",
42+
"@vaadin/split-layout": "25.2.0-alpha10",
4143
"@vaadin/tabs": "25.2.0-alpha10",
4244
"@vaadin/test-runner-commands": "25.2.0-alpha10",
4345
"@vaadin/testing-helpers": "^2.0.0",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { expect } from '@vaadin/chai-plugins';
2+
import { fixtureSync, nextFrame } from '@vaadin/testing-helpers';
3+
import '@vaadin/scroller';
4+
import '@vaadin/split-layout';
5+
6+
describe('scroller in split-layout', () => {
7+
let splitLayout, scroller;
8+
9+
beforeEach(async () => {
10+
splitLayout = fixtureSync(`
11+
<vaadin-split-layout style="width: 400px; height: 200px">
12+
<vaadin-scroller>
13+
<div style="height: 1000px"></div>
14+
</vaadin-scroller>
15+
<div></div>
16+
</vaadin-split-layout>
17+
`);
18+
scroller = splitLayout.querySelector('vaadin-scroller');
19+
await nextFrame();
20+
});
21+
22+
it('should scroll the scroller content', async () => {
23+
scroller.scrollTop = 100;
24+
await nextFrame();
25+
expect(scroller.scrollTop).to.equal(100);
26+
});
27+
});

0 commit comments

Comments
 (0)