Page MenuHomePhabricator

Cursor moves to start of inserted text on non-IE browsers
Closed, ResolvedPublic

Description

Author: wikibugs

Description:
Reporting against latest version hosted on http://test.wikipedia.org

Steps to reproduce :

  1. Start creating a new page in IE
  2. Click on New line icon in toolbar

The cursor is moved to a new line.
In All other browsers <br /> is inserted and cursor is moved to the beginning of the tag.

Expected Outcome :

  1. The cursor position after inserting line break shall be consistent across browsers
  2. It would be better if IE behavior (New line is inserted after tag and cursor is at the beginning of new blank link) is available.

Version: unspecified
Severity: major
URL: http://test.wikipedia.org

Details

Reference
bz22379

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 10:50 PM
bzimport set Reference to bz22379.

nkomura wrote:

This problem is observed with FF3.0 on Ubuntu 9.04 too.

(In reply to comment #1)

This problem is observed with FF3.0 on Ubuntu 9.04 too.

As the title says, this happens on all NON-IE browsers, that includes FF3.

pvora wrote:

Expected outcome (all browsers): Cursor position after action/formatting (whether with selected text or example text) is at the end of text + formatting.

Exception: Line break, where the cursor appears at the beginning of a new blank line.

Possible Exceptions: In the future, on "inserts" (i.e. toolbar button actions with no selected text), we may want to consider the cursor position to be inside the formatting brackets, where applicable.

Example:

  • (user clicks ref, without anything selected)
  • "<ref>Insert footnote text here</ref>" appears in the editor window
  • Cursor positioned at the end of "here" before the "</ref>

(In reply to comment #3)

Expected outcome (all browsers): Cursor position after action/formatting
(whether with selected text or example text) is at the end of text +
formatting.

To clarify: this means the cursor position always goes to the end of the inserted text no matter what? We don't wanna select inserted example text?

Exception: Line break, where the cursor appears at the beginning of a new
blank line.

That's not really an exception, right? The line break is part of the inserted text, after all.

Possible Exceptions: In the future, on "inserts" (i.e. toolbar button actions
with no selected text), we may want to consider the cursor position to be
inside the formatting brackets, where applicable.

Example:

  • (user clicks ref, without anything selected)
  • "<ref>Insert footnote text here</ref>" appears in the editor window
  • Cursor positioned at the end of "here" before the "</ref>

Our previous behavior was to select "Insert footnote here" in this case. But right now you want the cursor to go after </ref> as well, correct?

pvora wrote:

Ack, sorry, you're right. On "inserts" we should highlight/select example text (i.e. "Insert footnote here")

and the line break is an exception in that it does not appear right after the > of <br/> but rather on the new line.

(In reply to comment #5)

Ack, sorry, you're right. On "inserts" we should highlight/select example text
(i.e. "Insert footnote here")

Bleh, that means more work :)

and the line break is an exception in that it does not appear right after the >
of <br/> but rather on the new line.

*Technically* it's not an exception, because this button inserts "<br />\n" where \n is a newline, so placing the cursor after the \n (i.e. on the new line) is exactly in line with the other buttons' behavior. Nothing to worry about, though, just means less work for me :)

wikibugs wrote:

Tested link: http://prototype.wikimedia.org/deployment-en/
Version : r62529

Verified and close