<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Undo Sequence Seems Incorrect When Undo-ing Auto Link/Email Formatting Created on Enter/Newline"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=122052">122052</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undo Sequence Seems Incorrect When Undo-ing Auto Link/Email Formatting Created on Enter/Newline
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.1.2.1 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sclark100@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
The Undo step for undoing auto-formatting of email addresses/links after a
newline seems like it is in the wrong order with the enter/new line action.
User can’t undo auto formatting and continue with next paragraph as expected.

The undo action for auto-formatting seems to work correctly when the link is
not at the end of the paragraph.

I’m using version 6.1.2.1 on Fedora 29

Steps to Reproduce:
1) Write a paragraph with a link or email address at the end. Last sentence may
have closing punctuation or it may not. For example as the last sentence in the
paragraph:

My email address is <a href="mailto:somebody@libreoffice.org">somebody@libreoffice.org</a>

LibreOffice is a cool project. Their website is <a href="http://libreoffice.org">http://libreoffice.org</a>

LibreOffice is a cool project. Their website is <a href="http://libreoffice.org">http://libreoffice.org</a>.

2) Type “Enter” to move to new line/paragraph
- LibreOffice performs auto-formatting at this point

3) Realize that auto-formatting of link/email is not desired.
4) Click Undo to remove auto formatting.

Actual Results:
5) On first undo, LibreOffice undoes the enter/newline.
6) formatting still remains. Undo again.
7) On second undo, if there was closing punctuation, LibreOffice skips the
cursor back one character but still does not undo the formatting. If there was
no closing punctuation, LibreOffice appears to do nothing.
8) formatting still remains. Undo again.
9) On third undo, formatting is removed.
10) Attempt to continue with document. Press enter to move to new line as was
originally desired in step 2.
- As in step 2, LibreOffice again auto-formats the link/email
12) User does not want auto formatting but now realizes they are in a loop.
They want to undo the auto formatting and also create a newline at the end of
the paragraph but there isn’t a way to do this short of creating the newline
prior to writing the end of the paragraph, and then going back to the paragraph
to add the link.

Expected Results:
5) auto-formatting is removed
6) continue with work


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.2.1
Build ID: 6.1.2.1-3.fc29
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>