Last modified: 2014-10-28 19:51:09 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
Created attachment 16039 [details] Demo video of the issue
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.
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.
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
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.
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.
(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.
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
(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
Moving over to Roan.