Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scroll not working when overflowY is set to auto/scroll and overflowX not set #681

Merged
merged 3 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion integration_tests/specs/css/css-box/overflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,49 @@ describe('Overflow', () => {

expect(clickCount).toBe(2);
});
});

// @TODO simulateSwipe method fails to trigger element scroll.
// https://github.com/openkraken/kraken/issues/680
xit('scroll works with overflowY set to auto and overflowX not set', async (done) => {
let div;
div = createElement(
'div',
{
style: {
width: '200px',
height: '200px',
overflowY: 'auto',
},
}, [
createElement(
'div',
{
style: {
width: '200px',
height: '200px',
backgroundColor: 'green',

},
}),
createElement(
'div',
{
style: {
width: '200px',
height: '200px',
backgroundColor: 'yellow',

},
}),
],
);
BODY.appendChild(div);
await snapshot();
await simulateSwipe(50, 100, 50, 20, 0.1);

setTimeout(async () => {
await snapshot();
done();
}, 200);
});
});
1 change: 1 addition & 0 deletions kraken/lib/src/rendering/box_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ class RenderBoxModel extends RenderBox

// Copy overflow
..scrollListener = scrollListener
..pointerListener = pointerListener
..clipX = clipX
..clipY = clipY
..enableScrollX = enableScrollX
Expand Down