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

[BUG] Dropdown Element selection scrolls up & down (when present in overlay with scroll enabled) #9073

Closed
sureshahead opened this issue Sep 22, 2021 · 2 comments

Comments

@sureshahead
Copy link

Context:
Playwright Version: 1.15.0
Operating System: Windows 10 Enterprise (64-bit)
Browser: Chrome (having issue loading Firefox #8957)

Code :

    var select = await this.page.waitForSelector('' + selectorStr + '');
    await select.click();
    var option = await this.page.waitForSelector('' + selectorStr + ' >> [role="option"] >> ' + 'text="' + optionValue + '"', { state: 'attached' });
    //await option.scrollIntoViewIfNeeded();
    await option.click();

Describe the bug

We have a dropdown in a modal window (not a regular select). Selection of last item in a dropdown (say Item 11 in this case) keeps scrolling the modal up and down and the dropdown value selection never happens. Whereas if I choose say Item 7 which did not require scrolling till the last in dropdown - the selection works fine. Otherwise when I load the browser in maximized mode which ensured that the scroll for the modal is not needed - then the last item selection works fine.

Also the same dropdown is present elsewhere in the page(I mean no overlay involved) which has scroll, in such case the last value selection for a long list works seamless.

Please let me know if any additional info needed, will see if I can get.

Scenario Representation (ours is internal app and hence this is the best we can share) :
image

Log: (I have mimicked Item 10 and Item 11 from above screenshot for the purpose of understanding)

pw:api <= elementHandle.click succeeded +0ms
pw:api => page.waitForSelector started +1ms
pw:api waiting for selector "//div[@id="create_case_adjacency"] >> [role="option"] >> text="Item 10"" +0ms
pw:api selector resolved to visible <li id="PAYPAL-7" role="option" aria-selected="false…>Item 10 +3ms
pw:api <= page.waitForSelector succeeded +2ms
pw:api => elementHandle.click started +1ms
pw:api attempting click action +0ms
pw:api waiting for element to be visible, enabled and stable +0ms
pw:api element is visible, enabled and stable +33ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +0ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from

subtree intercepts pointer events +5ms
pw:api retrying click action, attempt #1 +0ms
pw:api waiting for element to be visible, enabled and stable +0ms
pw:api element is visible, enabled and stable +26ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +3ms
pw:api checking that element receives pointer events at (790,505.29) +1ms
pw:api
intercepts pointer events +3ms
pw:api retrying click action, attempt #2 +0ms
pw:api waiting 20ms +0ms
pw:api waiting for element to be visible, enabled and stable +24ms
pw:api element is visible, enabled and stable +20ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +2ms
pw:api checking that element receives pointer events at (790,399.95) +2ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +4ms
pw:api retrying click action, attempt #3 +0ms
pw:api waiting 100ms +0ms
pw:api waiting for element to be visible, enabled and stable +104ms
pw:api element is visible, enabled and stable +20ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +2ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +6ms
pw:api retrying click action, attempt #4 +0ms
pw:api waiting 100ms +0ms
pw:api waiting for element to be visible, enabled and stable +104ms
pw:api element is visible, enabled and stable +21ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +4ms
pw:api retrying click action, attempt #5 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +506ms
pw:api element is visible, enabled and stable +22ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +3ms
pw:api checking that element receives pointer events at (790,505.29) +0ms
pw:api
intercepts pointer events +4ms
pw:api retrying click action, attempt #6 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +30ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +6ms
pw:api checking that element receives pointer events at (790,399.95) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +5ms
pw:api retrying click action, attempt #7 +0ms
pw:api waiting 500ms +1ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +12ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #8 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +504ms
pw:api element is visible, enabled and stable +24ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #9 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +504ms
pw:api element is visible, enabled and stable +8ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +2ms
pw:api checking that element receives pointer events at (790,505.29) +1ms
pw:api
intercepts pointer events +3ms
pw:api retrying click action, attempt #10 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +8ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,399.95) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #11 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +502ms
pw:api element is visible, enabled and stable +10ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +2ms
pw:api checking that element receives pointer events at (790,363.51) +0ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #12 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +504ms
pw:api element is visible, enabled and stable +7ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +0ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #13 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +502ms
pw:api element is visible, enabled and stable +12ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +2ms
pw:api checking that element receives pointer events at (790,505.29) +1ms
pw:api
intercepts pointer events +2ms
pw:api retrying click action, attempt #14 +1ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +7ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,399.95) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +2ms
pw:api retrying click action, attempt #15 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +504ms
pw:api element is visible, enabled and stable +10ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #16 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +9ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +0ms
pw:api checking that element receives pointer events at (790,363.51) +1ms
pw:api <li id="PPWC-8" role="option" aria-selected="false" …>Item 11 from
subtree intercepts pointer events +3ms
pw:api retrying click action, attempt #17 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +10ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +1ms
pw:api checking that element receives pointer events at (790,505.29) +1ms
pw:api
intercepts pointer events +4ms
pw:api retrying click action, attempt #18 +0ms
pw:api waiting 500ms +0ms
pw:api waiting for element to be visible, enabled and stable +503ms
pw:api element is visible, enabled and stable +24ms
pw:api scrolling into view if needed +0ms
pw:api done scrolling +5ms
pw:api checking that element receives pointer events at (790,399.95) +1ms

@mxschmitt
Copy link
Member

Do you have a reproducible for us - e.g. only the dropdown control? Otherwise its hard for us to reproduce it locally.

@aslushnikov
Copy link
Collaborator

Unfortunately, this is not actionable without a repro. Feel free to re-file with a repro so that we can debug it locally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants