Last modified: 2013-11-25 10:17:44 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 T54159, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52159 - VisualEditor: Inserting an existing reference in the first paragraph in Firefox puts it at the start of the paragraph, not where the cursor is
VisualEditor: Inserting an existing reference in the first paragraph in Firef...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-08-22
Assigned To: Ed Sanders
:
: 52594 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-27 23:03 UTC by Rastus Vernon
Modified: 2013-11-25 10:17 UTC (History)
6 users (show)

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


Attachments

Description Rastus Vernon 2013-07-27 23:03:29 UTC
When an existing reference is inserted, it is put at the start of the paragraph the cursor is currently in, regardless of where it is in that paragraph. This has happened to me while I was attempting to use in a paragraph a reference that was already used in that paragraph: the reference got inserted at the start of the paragraph and I was not able to move it. I tried again some times but it still did not work and I had to use the wikitext editor.
Comment 1 John Mark Vandenberg 2013-07-28 22:54:41 UTC
I did only a quick test, and could not reproduce this bug.  Could you give more detailed instructions?
Comment 2 Rastus Vernon 2013-07-31 00:48:10 UTC
I have done similar manipulations in other articles at some moments, and it seems it sometimes works and sometimes doesn't. There are many things that are strange concerning how the existing references system works.

Regardless, I set up a sandbox page on my user space, added a reference and then tried to re-use that reference using the VisualEditor. The reference was added at the start of the paragraph. I've done some more experimenting, and I've written steps to reproduce the bug; the first block reproduces the bug and the following blocks are other experimentations that give more strange results.

1. Go to [[User:Rastus Vernon/VisualEditor Sandbox]].
2. Edit the page with the VisualEditor.
3. Click somewhere in the first paragraph, not at the start.
4. Click on the reference button and re-use the reference (there is only one).
5. Note how the reference was inserted at the start of the paragraph instead of being inserted where your cursor was.

6. Click in another paragraph, not at the start.
7. Insert the same reference again.
8. Note how the reference was inserted at the right position.

9. Perform steps 7 and 8 again.
10. Note how it was again inserted at the right position, although the reference is already in that paragraph.

11. Try inserting it again in the first paragraph.
12. Note how it still inserts it at the start of the paragraph instead of inserting it in the right location.

13. Be confused because you don't understand anything about this inconsistent behavior.
Comment 3 Chris McKenna 2013-08-15 08:07:57 UTC
At en.wp WhatamIdoing reports:
I was just trying to add the ref to the other sentences. It misplaced two copies at the start of the paragraph when I wanted one at the end of the first line of the first paragraph (perhaps I clicked too high on the top line of the edit window?). After I removed those, I couldn't add any more. Clicking the ref button did nothing." He gives the following URL:
https://en.wikipedia.org/w/index.php?title=Swing_%28seat%29&diff=568557479&oldid=568556853
Comment 4 James Forrester 2013-08-16 00:06:49 UTC
AFAICT this only happens in the first paragraph (and only in Firefox).

This is throwing an error in Rangy:

  TypeError: sel.nativeSelection is null
  sel._ranges.length = sel.rangeCount = sel.nativeSelection.rangeCount;

… but for some reason I can't get Firebug to give me a trace.
Comment 5 Gerrit Notification Bot 2013-08-20 17:22:16 UTC
Change 80056 had a related patch set uploaded by Esanders:
Preserve selection when inserting references

https://gerrit.wikimedia.org/r/80056
Comment 6 Gerrit Notification Bot 2013-08-20 17:24:44 UTC
Change 80056 merged by jenkins-bot:
Preserve selection when inserting references

https://gerrit.wikimedia.org/r/80056
Comment 7 James Forrester 2013-08-20 17:25:26 UTC
Should now be fixed; we will deploy this earlier than scheduled, later today.
Comment 8 James Forrester 2013-11-25 10:17:44 UTC
*** Bug 52594 has been marked as a duplicate of this bug. ***

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


Navigation
Links