When I am reading an article on the English Wikipedia, selecting any text close to the top of the screen will cause the article to scroll upwards rapidly.
The issue also seems to occur test2.wikipedia.org/wiki
Steps to replicate the issue (include links if applicable):
- View an article
- Scroll down slightly
- Select text close to the top of the screen
What happens?:
The article will automatically scroll up rapidly until the top of the page is reached.
What should have happened instead?:
No automatic scrolling should occur, or the page should only slightly scroll up to display the selected text.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Occurs on following browsers
Chrome Version 124.0.6367.92
Edge Version 124.0.2478.67
Firefox Version 125.0.3
Possible cause
What I think might be the problem here is a feedback loop happens when selecting text near the top of the screen.
- The user selects text close to the top of the screen, which causes the article to scroll up slightly.
- This means the cursor will select text close to the top of the screen again because it stays close to the top of the page.
- This means the screen will move up slightly again to show the selected text, and the process repeats
Requirement
Selecting text near the top of a Wikipedia article on mobile should not trigger excessive automatic scrolling.
BDD
Feature: Prevent rapid scroll when selecting text near top of screen Scenario: Selecting text near top of screen triggers scroll Given I am viewing an article on the mobile site And I have scrolled slightly down the page When I attempt to select text near the top of the viewport Then the page should not scroll rapidly to the top
Test Steps
Test Case 1: Selecting text near top does not trigger rapid scroll
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Apple_Inc. or https://test2.wikipedia.org/wiki
- Scroll slightly down the page (1–2 paragraphs)
- Tap and hold to begin selecting text near the top of the viewport
- Drag slightly to highlight
- AC1: No rapid automatic scrolling occurs to the top of the page
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T364023#10926789 |
