Last modified: 2014-09-15 17:31:21 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 T61652, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59652 - VisualEditor: Can't add new paragraphs to the end of the page, if the last line is an empty section heading == <nowiki/> ==
VisualEditor: Can't add new paragraphs to the end of the page, if the last l...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: Normal enhancement
: VE-deploy-2014-09-18
Assigned To: Bartosz Dziewoński
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-04 17:02 UTC by WhatamIdoing
Modified: 2014-09-15 17:31 UTC (History)
6 users (show)

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


Attachments

Description WhatamIdoing 2014-01-04 17:02:05 UTC
Intention:
Add a new paragraph at the bottom of a page that ended in == <nowiki/> == (not counting the category after the empty section heading).

I was hoping that adding a new paragraph underneath the blank section heading would allow me to select, and therefore to remove, the blank section heading.


Steps to Reproduce:
1. Edit a page that ends in a == <nowiki/> ==, like https://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox2&oldid=589158823

2. Place the cursor in the empty section heading.

3. Hit return.

Actual Results:  
Pressing return adds blank paragraphs *above* the empty section heading. 

If you type anything into the section heading, then it starts behaving normally.

Expected Results:  
Doing the same thing for an empty (or non-empty) section heading anywhere else on the page adds new paragraphs *under* the empty section heading.  Pressing return in a section heading should produce the same behavior everywhere on the page.

Reproducible: Always
Comment 1 Bartosz Dziewoński 2014-09-13 15:26:54 UTC
This is also reproducible with other block nodes, like preformatted text.

There's code in ve.ce.Surface#handleEnter to "If we're at the start/end of something that's not a paragraph, insert a paragraph before/after". The quirk is that it checks for the "at the start" case before checking the "at the end" case, and for empty elements both of these are true. Let's just flip the order.
Comment 2 Gerrit Notification Bot 2014-09-13 15:31:35 UTC
Change 160215 had a related patch set uploaded by Bartosz Dziewoński:
ve.ce.Surface: Insert new paragraphs after empty nodes rather than before

https://gerrit.wikimedia.org/r/160215
Comment 3 Gerrit Notification Bot 2014-09-15 17:29:56 UTC
Change 160215 merged by jenkins-bot:
ve.ce.Surface: Insert new paragraphs after empty nodes rather than before

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

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


Navigation
Links