Last modified: 2014-09-23 18:29:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52100, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50100 - VisualEditor: Deletion across a header caused it to remain without WS, leading Parsoid to output "==<nowiki/>=="
VisualEditor: Deletion across a header caused it to remain without WS, leadin...
Status: PATCH_TO_REVIEW
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 50313 51417 51829 (view as bug list)
Depends on: 49452
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 14:58 UTC by MZMcBride
Modified: 2014-09-23 18:29 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Comment 1 James Forrester 2013-07-06 23:52:43 UTC
*** Bug 50313 has been marked as a duplicate of this bug. ***
Comment 2 Patrick Earley 2013-07-16 01:28:11 UTC
*** Bug 51417 has been marked as a duplicate of this bug. ***
Comment 3 Ed Sanders 2013-07-16 15:11:10 UTC
I'm not sure we should be deleting empty headings. The user may want to delete all the contents of a heading and replace it (or select-all then type, which would perform the same operations internally).

More generally we don't delete paragraphs when they are empty, unless the user presses backspace again, so doing so for just headings would be a confusing user experience.

Perhaps a solution would be for Parsoid to strip empty blocks (provided they weren't that way to begin with)?
Comment 4 Ed Sanders 2013-07-16 15:12:34 UTC
Or we have a system for flagging up formatting irregularities (e.g. markers in the margin), which could also flag up other violations of formatting conventions (e.g. double linebreaks).
Comment 5 James Forrester 2013-07-16 15:17:20 UTC
(In reply to comment #3)
> I'm not sure we should be deleting empty headings. The user may want to
> delete all the contents of a heading and replace it (or select-all then type,
> which would perform the same operations internally).

Oh, yes, this was meant to be on save, rather than as they edit.

> Perhaps a solution would be for Parsoid to strip empty blocks (provided they
> weren't that way to begin with)?

That could also work, but feels a bit clunky; I think Parsoid should expect users to send it the HTML they actually want saved, and that it's up to clients to encourage users to indeed create such HTML.
Comment 6 Ed Sanders 2013-07-16 16:02:14 UTC
"Encourage" yes...
Comment 7 Roan Kattouw 2013-07-23 20:03:27 UTC
*** Bug 51829 has been marked as a duplicate of this bug. ***
Comment 8 Dan Barrett 2013-07-23 20:31:41 UTC
Speaking as an end-user, I spent quite some time trying to figure out how to delete a heading. It was quite confusing. Bug 51829 (marked as a duplicate) describes my attempts.

VE's behavior in this regard is the opposite of (say) MS Word's.  In Word, if you highlight one character beyond the heading and press Delete, you remove the heading. In VE, you have to highlight an invisible area *preceding* the heading. This is not intuitive.
Comment 9 Elitre 2013-08-06 12:39:11 UTC
Since 51829 is now marked as a dupe, 
should we also discuss here an issue that Dan reported as well - VE turning the next paragraph into a heading,
or that "when pressing delete on an empty heading line, if there is a template such as {{main}} on the next line, it is unexpectedly deleted", as user:WS states on enwp?
Comment 10 Elitre 2013-08-08 09:20:00 UTC
<< Often, when an editor tries to remove (or accidentally removes) a section header, the result in VE is something like this: http://en.wikipedia.org/w/index.php?title=%C3%87ank%C4%B1r%C4%B1_Province&diff=567375871&oldid=542107518 . This is seldom (if ever) the intention, can VE be coded to simply remove the section header in these cases? Fram (talk) 09:32, 6 August 2013 (UTC) >>
Comment 11 Spinningspark 2013-08-22 20:26:28 UTC
This editor http://en.wikipedia.org/w/index.php?title=Pound_%28mass%29&diff=569770089&oldid=569255959 removed the whole section.  It could not possibly have been their intention to leave behind an empty heading line.
Comment 12 Chris McKenna 2013-08-23 01:51:20 UTC
en.wp user 28bytes comments:
There was an unneeded section, so I selected the section, pressed "delete" and saved. VE did this [1]; I expected it to do this. [2]

1: https://en.wikipedia.org/w/index.php?title=Degeneracy&diff=prev&oldid=569795975
2: https://en.wikipedia.org/w/index.php?title=Degeneracy&diff=569796007&oldid=567105149
Comment 13 Gerrit Notification Bot 2014-09-23 18:29:27 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links