diff --git a/integration_tests/specs/css/css-box/overflow.ts b/integration_tests/specs/css/css-box/overflow.ts index 963fa80b53..4fc8691f19 100644 --- a/integration_tests/specs/css/css-box/overflow.ts +++ b/integration_tests/specs/css/css-box/overflow.ts @@ -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); + }); +}); \ No newline at end of file diff --git a/kraken/lib/src/rendering/box_model.dart b/kraken/lib/src/rendering/box_model.dart index 95819e0c20..9b47e2542c 100644 --- a/kraken/lib/src/rendering/box_model.dart +++ b/kraken/lib/src/rendering/box_model.dart @@ -617,6 +617,7 @@ class RenderBoxModel extends RenderBox // Copy overflow ..scrollListener = scrollListener + ..pointerListener = pointerListener ..clipX = clipX ..clipY = clipY ..enableScrollX = enableScrollX