Page MenuHomePhabricator

The "Visual differences" beta feature outputs two different HTML div with same ID
Closed, DuplicatePublic

Description

This is a bug of VisualDiff.
The way to reproduce:

  1. Enable VisualDiff in preferences,
  2. Go to any diff page, like this,
  3. And look at the HTML.

We can find two <div>'s have the same ID: #mw-diff-ntitle1. Actually, any HTML containing two tags sharing the same ID will be invalid. It affected some gadgets like Twinkle which use getElementById and want to get the tag in diffmode=source but got diffmode=visual one, because it appears before the other one in HTML code.

(Sorry for my poor English, not a native speaker.)

Event Timeline

EtaoinWu created this task.Apr 27 2018, 5:11 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptApr 27 2018, 5:11 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Xiplus added a subscriber: Xiplus.Apr 27 2018, 5:14 AM
Vvjjkkii renamed this task from The "Visual differences" beta feature outputs two different HTML div with same ID to 53daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Mainframe98 renamed this task from 53daaaaaaa to The "Visual differences" beta feature outputs two different HTML div with same ID.Jul 1 2018, 9:01 AM
Mainframe98 raised the priority of this task from High to Needs Triage.
Mainframe98 updated the task description. (Show Details)
Mainframe98 added a subscriber: Aklapper.