Last modified: 2013-06-27 22:41:27 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 T50735, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48735 - VisualEditor: Return at start of header causes cursor to move two characters down-page, not one
VisualEditor: Return at start of header causes cursor to move two characters ...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: Normal minor
: VE-deploy-2013-07-04
Assigned To: Rob Moen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 23:10 UTC by spage
Modified: 2013-06-27 22:41 UTC (History)
6 users (show)

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


Attachments

Description spage 2013-05-22 23:10:19 UTC
On my user page https://www.mediawiki.org/wiki/User:S_Page_%28WMF%29 and now on a test page https://www.mediawiki.org/wiki/User:S_Page_%28WMF%29/VE_bugs every time I try to add a new section VE goes haywire

1. Edit (with VE)
2. Click at start of first heading ("welcomecreation...")
3. Press Enter, it prepends new heading (good)
4. Press up arrow to move up to this new blank heading.
5. Start typing the heading, e.g. press 'X'
6. That was wrong, so press Backspace (or left arrow)

Result:
The text of the heading underneath leaps above the new heading, joining text above it.
I can edit other parts of the document, but whenever I return to my new heading to add or backspace, the caret jumps elsewhere.
If I undo enough times, VE undoes to a state where the new header displays below the existing header. The document looks different to what it did before, but [Review and save] is grayed out.

I created a new document https://www.mediawiki.org/wiki/User:S_Page_%28WMF%29/VE_bugs and similar stuff happens in that.

This is in Firefox 21 on Ubuntu, and mediawiki.org's VE as of today.
Comment 1 spage 2013-05-22 23:13:53 UTC
In Chromium (25.0.1364.160 Ubuntu 13.04) not logged in, the same step 3 adds blank line above (not styled as a heading) and moves the caret to the second character in the existing heading.
Comment 2 phoebe 2013-05-26 23:27:34 UTC
I'm getting a similar bug while trying to edit a userpage subpage, with the addition that it's blanking out the existing text. See https://en.wikipedia.org/wiki/User:Phoebe/chopo

1) edit existing text, all is fine. 
2) move cursor below existing paragraph, attempt to type new heading
3) cursor jumps to above existing paragraph, types up there
4) this results in uneditable blank spaces 
5) and, on save, all text below blank spaces is gone. 

My conclusion is that editing user pages is, for whatever reason, totally haywire. I have screenshots if needed. 

Firefox 20.0 on Ubuntu 12.04
Comment 3 spage 2013-06-17 20:36:33 UTC
These days the behavior on mediwiki.org (with Firefox 21.0 Ubuntu 13.04) is different and a little better.
* If you press Enter with the caret at start of heading, you get a plain paragraph before (maybe OK but not what I'd expect and not how most WYSIWYG editors work)
* The caret moves between the first and second character of the heading (definitely wrong).
But the document doesn't get out of order, your typing always appears at the caret, and what you see is what is saved. Progress!
Comment 4 James Forrester 2013-06-17 21:33:39 UTC
(In reply to comment #3)
> These days the behavior on mediwiki.org (with Firefox 21.0 Ubuntu 13.04) is
> different and a little better.
> * If you press Enter with the caret at start of heading, you get a plain
> paragraph before (maybe OK but not what I'd expect and not how most WYSIWYG
> editors work)

This is intentional - if you have header 1\nheader 2\nheader 3\n and click before header 3 and press return, you should be able to type content (paragraph) by default. WYSIWYG editors often get this wrong, thinking that context is the most important thing, because they don't know what style "normal" content is. We do, and so we should do this right. (Also, VE isn't intending to be a WYSIWYG editor, just a visual one that is more and WYSIWYM editor at times.)

> * The caret moves between the first and second character of the heading
> (definitely wrong).

Yeah, sorry about that; we should get that fixed soon.
Comment 5 spage 2013-06-18 01:50:49 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > * If you press Enter with the caret at start of heading, you get a plain
> > paragraph before (maybe OK but not what I'd expect and not how most WYSIWYG
> > editors work)
> 
> This is intentional - if you have header 1\nheader 2\nheader 3\n and click
> before header 3 and press return, you should be able to type content
> (paragraph) by default.

Sounds good, though I note it's different than e.g. pressing Enter at the start of the first of a set of bullet points, which adds another bullet rather than a plain paragraph. A foolish consistency is the Hobnobs of little minds :)
Comment 6 James Forrester 2013-06-18 01:56:49 UTC
(In reply to comment #5)
> Sounds good, though I note it's different than e.g. pressing Enter at the
> start of the first of a set of bullet points, which adds another bullet rather
> than a plain paragraph. A foolish consistency is the Hobnobs of little minds :)

Yeah, I've been wondering whether to make these consistent for a little bit.
Comment 7 Gerrit Notification Bot 2013-06-27 19:05:28 UTC
Change 70864 had a related patch set uploaded by Robmoen:
Don't advance cursor when adding new line at start of node

https://gerrit.wikimedia.org/r/70864
Comment 8 Gerrit Notification Bot 2013-06-27 20:57:49 UTC
Change 70918 had a related patch set uploaded by Robmoen:
If cursor is obscured by toolbar, on keypress scroll to cursor.

https://gerrit.wikimedia.org/r/70918
Comment 9 Gerrit Notification Bot 2013-06-27 21:23:40 UTC
Change 70918 merged by jenkins-bot:
If cursor is obscured by toolbar, on keypress scroll to cursor.

https://gerrit.wikimedia.org/r/70918
Comment 10 Gerrit Notification Bot 2013-06-27 21:23:43 UTC
Change 70864 merged by jenkins-bot:
Don't advance cursor when adding new line at start of node

https://gerrit.wikimedia.org/r/70864
Comment 11 James Forrester 2013-06-27 21:55:58 UTC
This should now be fixed; we will push this to production this afternoon.

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


Navigation
Links