Problem description: Steps to reproduce: 1. Write the text "This is a comment." 2. Mark the word "comment". 3. Insert a comment (Insert/Comment). 4. Press undo-button in the toolbar (or Edit/Undo). 5. Mark the word "comment" again. It is not possible to insert a comment anymore to this word. Insert/Comment is grayed out. Mark "a comment". This works. You can insert a comment now. Press undo-button in the toolbar (or Edit/Undo). Now it is impossible to insert a comment to "comment" and "a comment". Mark the "mm"-sequence and insert a comment. This works, but the sequence "ent." after that has gray background. Current behavior: undo broken Expected behavior: undo works Platform (if different from the browser): Browser: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Confirmed, quite annoying and a regression. Marking: New (Confirmed) Normal (can prevent high quality work under specific scenario) Low (there isn't a workaround but you can insert a comment just slightly off of the same spot and it works fine, furthermore situation of adding a comment, then undoing the comment, then wanting to put another comment there seems pretty rare) Whiteboard: regression Also note that if you go to insert it's not just comment that is grayed out, it's really everything in there. Undo is clearly borked with comments
Indeed, so if a textrange comment is inserted, and one just clicks away (so the comment gets removed as it has no content), that works; but in case undo is used, only the comment is removed, the underlying fieldmark is not. I'll look into this.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f132eaa5a6ec6fd3051442bda9caf94a3341c680 fdo#53487 SwUndoInsert: take care of fieldmarks when deleting field chars The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fixed in master, marking as resolved. -4-0 review: https://gerrit.libreoffice.org/1652
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b825f95fa100f2a54032ec5a1ff51de0db17ea1d&h=libreoffice-4-0 fdo#53487 SwUndoInsert: take care of fieldmarks when deleting field chars It will be available in LibreOffice 4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.