Page MenuHomePhabricator

Select all produces an incorrect DOM range when the page ends in a block slug
Closed, ResolvedPublic8 Estimated Story Points

Description

Go to any page with a block slug at the end (e.g. aliens.html). Press CTRL+A. The view selection range end is too early in the document.

Event Timeline

Esanders raised the priority of this task from to Needs Triage.
Esanders updated the task description. (Show Details)
Esanders added a project: VisualEditor.
Esanders added subscribers: Esanders, dchan.

This appears to be caused by block slugs - if you remove all block aliens from the document the bug goes away.

Change 205580 had a related patch set uploaded (by Divec):
Fix getNodeAndOffset for block slugs

https://gerrit.wikimedia.org/r/205580

Change 205580 fixes the view selection. But there's a separate issue that the model selection is not in fact correct: a CTRL+A selection should start at DM position 1, not position 0.

dchan renamed this task from Select all produces strange offsets to Select all produces an incorrect DOM range.Apr 21 2015, 11:29 AM
dchan renamed this task from Select all produces an incorrect DOM range to Select all produces an incorrect DOM range when the page ends in a block slug.
dchan updated the task description. (Show Details)
dchan set Security to None.

Change 205580 merged by jenkins-bot:
Fix getNodeAndOffset for block slugs

https://gerrit.wikimedia.org/r/205580