VisualEditor: Whitespace-only headings should be collapsed to (blank) paragraphs
Closed, ResolvedPublic

Description

When an editor tried to remove a heading, the following empty h3 tag seems to have been left behind: <h3 data-parsoid='{"dsr":[4514,4534,3,3]}'></h3>

Serializes to ===<nowiki/>=== and the user complained about it.

From the bug report: /mng/bugs/en.2013-06-10T16:41:02.032Z-Lightning_(software) on parsoid.wmflabs.org


Version: unspecified
Severity: enhancement

bzimport set Reference to bz49452.
ssastry created this task.Via LegacyJun 11 2013, 8:15 PM
ssastry added a comment.Via ConduitJun 11 2013, 8:32 PM

/mnt/bugs/2013-06-09T22%3A08%3A31.223Z-Sapo-comum (ptwiki) reports an empty heading left behind "== ==" when the user actually meant to delete it (and I presume thought it gone after the non-whitespace text was deleted).

ssastry added a comment.Via ConduitJun 11 2013, 8:49 PM

/mnt/bugs/2013-06-10T13:57:10.670Z-%25E8%25A5%25BF%25E7%2593%259C%25E6%25B3%25A2 (chinese wikipedia) has an empty heading tag left behind as well (probably inserted when the user added a heading and then deleted it).

gerritbot added a comment.Via ConduitOct 5 2014, 7:54 PM

Change 162310 had a related patch set uploaded by Jforrester:
MWHeading: Don't put self in output if contents are blank or whitespace

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

Jdforrester-WMF added a comment.Via ConduitNov 13 2014, 1:50 PM
  • Bug 70368 has been marked as a duplicate of this bug. ***
Jdforrester-WMF moved this task to Next up: Stability on the VisualEditor workboard.Via WebNov 23 2014, 11:02 PM
Jdforrester-WMF moved this task to Doing on the VisualEditor workboard.Via WebDec 1 2014, 9:25 PM
Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebJan 15 2015, 12:09 AM
gerritbot added a subscriber: gerritbot.Via ConduitFeb 17 2015, 6:22 PM

Change 162310 had a related patch set uploaded (by Jforrester):
MWHeading: Don't put self in output if contents are blank or whitespace

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

Patch-For-Review

Jdforrester-WMF moved this task to Doing on the VisualEditor workboard.Via WebFeb 17 2015, 7:42 PM
Elitre added a subscriber: Elitre.Via WebFri, Feb 27, 3:52 PM
gerritbot added a comment.Via ConduitFri, Mar 20, 11:16 PM

Change 162310 merged by jenkins-bot:
For empty / whitespace-only headings, output <p> instead of <h#>

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

Jdforrester-WMF closed this task as "Resolved".Via WebFri, Mar 20, 11:25 PM
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF moved this task to Done on the VisualEditor 2014/15 Q3 blockers workboard.
Jdforrester-WMF moved this task to Done on the VisualEditor workboard.Via WebFri, Mar 20, 11:29 PM
Liuxinyu970226 removed a subscriber: Liuxinyu970226.Via WebSat, Mar 21, 3:41 AM
Etonkovidova added a subscriber: Etonkovidova.Via WebMon, Mar 23, 11:37 PM

Deleting headings is clean now

Beta


vs
current production(wmf22)

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.