Last modified: 2014-10-28 19:51:09 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 T70590, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68590 - VisualEditor: If you click out of a link inspector to somewhere else in the document, the link gets inserted and selected, moving your cursor away from where you clicked
VisualEditor: If you click out of a link inspector to somewhere else in the d...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High major
: VE-deploy-nextup
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-25 21:18 UTC by Alex Monk
Modified: 2014-10-28 19:51 UTC (History)
7 users (show)

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


Attachments
Demo video of the issue (2.12 MB, video/quicktime)
2014-07-25 21:43 UTC, James Forrester
Details

Description Alex Monk 2014-07-25 21:18:02 UTC
If I create a new link (not having selected any existing text), set some target, then instead of pressing 'done' I click into the surface where the link is to go, it creates the link. Since it's now highlighted, if I then press a random character it replaces the text.

But then if I press ctrl+z to undo changes, and then ctrl+z again, I get Uncaught Error: Invalid transaction, annotation to be cleared is not set
Comment 1 James Forrester 2014-07-25 21:43:07 UTC
Created attachment 16039 [details]
Demo video of the issue
Comment 2 James Forrester 2014-07-25 21:59:13 UTC
Note that if you do this in a block slug, the first character you type in goes into the paragraph above(!), not where the cursor is.
Comment 3 Ed Sanders 2014-07-27 13:14:30 UTC
The video you attached is of a different bug. If you click exactly where the cursor was, the inspector stays open. If you click elsewhere in the document you get Alex's bug.
Comment 4 Ed Sanders 2014-07-27 15:10:25 UTC
This is now three bugs:

* If you click out of an inspector somewhere else in the document, the link gets inserted and selected, moving your cursor away from where you clicked. This is this bug.
* If you type while a link is selected the transaction stored is not quite right, so the first undo looks wrong, and the second throws an exception. This is bug 68677.
* If you click in exactly where the cursor was, the inspector doesn't close. This is difficult to do and doesn't cause any corruption so is relatively minor, and is bug 68679
Comment 5 Bartosz Dziewoński 2014-09-17 12:08:23 UTC
What is the expected behavior? Discarding the input in the inspector? Making it impossible to close the inspector by clicking away? I can see these being more annoying than what happens now.
Comment 6 Bartosz Dziewoński 2014-09-25 23:02:11 UTC
To be clear, I suggest WONTFIX. The original major issue here (broken undo) has been split to bug 68677 and fixed a long time ago.
Comment 7 Krinkle 2014-10-28 19:06:46 UTC
(In reply to Bartosz Dziewoński from comment #6)
> To be clear, I suggest WONTFIX. The original major issue here (broken undo)
> has been split to bug 68677 and fixed a long time ago.

The original report mentioned two problems. The second is still happening.

(In reply to Alex Monk from comment #0)
> If I create a new link (not having selected any existing text), set some
> target, then instead of pressing 'done' I click into the surface where the
> link is to go, it creates the link. Since it's now highlighted, if I then
> press a random character it replaces the text.
> 
> But then if I press ctrl+z to undo changes, and then ctrl+z again, I get
> Uncaught Error: Invalid transaction, annotation to be cleared is not set

1. Cursor in empty paragraph.
2. Click "Link" tool
3. Enter page name or url and select it from suggestions.
4. Move cursor back into (empty) paragraph.
5. Type some text.

Issues:
* The first character of the entered text is completely ignored. The link defaults to the page name as its label, but is not rendered in the surface until the first character is entered (the moving of the cursor does nothing; I'd say the move of the cursor is when the automatic insertion should happen; the entering of text should either be treated as regular text input or as the desired label, not as trigger to render the link).
* The second character becomes the new label of the link (since the first character triggered its insertion and immediate selection).
* The third character should extend the label (per link trail), but instead becomes regular text adjacent to the link.
Comment 8 Krinkle 2014-10-28 19:08:51 UTC
Simplified:

Empty paragraph -> insert link to Main Page -> focus document (observe nothing changing, so user expects its safe to type quickly) -> type "abc" -> [[Main_Page|b]]c
Comment 9 Roan Kattouw 2014-10-28 19:11:49 UTC
(In reply to Krinkle from comment #7)
> (In reply to Bartosz Dziewoński from comment #6)
> > To be clear, I suggest WONTFIX. The original major issue here (broken undo)
> > has been split to bug 68677 and fixed a long time ago.
> 
> The original report mentioned two problems. The second is still happening.
> 
Yes, and it's filed as bug 68679. Comment 4 explains this perfectly.

Reverting summary change
Comment 10 James Forrester 2014-10-28 19:51:09 UTC
Moving over to Roan.

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


Navigation
Links