Description: I OCRed a document and each page has a header and footer graphic. When I delete them, I end up back at the beginning of the page. On one-hundred plus documents, that is a real pain. If I Ctrl-X, I at least stay on the same page so I can continue editing. Steps to Reproduce: 1.I attached a sample document. 2.Go to page 21 and delete the thin graphic at the top or bottom 3.Go to the next page and try Ctrl-X Actual Results: Delete jumps you to the beginning of the document Expected Results: Delete should leave you on the same page, not jump to the beginning. Reproducible: Always User Profile Reset: No Additional Info: I have a sample file for you to play with - others on the forum easily verified the problem.
Created attachment 182002 [details] A document that can demonstrate the problem This is one of several documents I have been making over the last couple of weeks. All exhibit the same delete, jump to the beginning of the file action. I only recently discovered by accident that Ctrl-X does not. The file was made with Omnipage Professional 18.
I couldn't reproduce with: Version: 7.2.7.2 / LibreOffice Community Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded or: Version: 7.3.5.2 / LibreOffice Community Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded or: Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: 24087697d5cf78aac346d4dcea0596373e15a95c CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded ... except if I leave my cursor at the beginning of the document. Dan, where is your cursor when you delete the image? The view should jump back to wherever your cursor is. Please also try updating to the latest version of LibreOffice 7.3 to see if you have the same issue: https://www.libreoffice.org/download/download-libreoffice/
Dan emailed me directly with a response: > As requested, I upgraded to the 7.3.5.2 version and the problem remains. Note: it is not 100%, never has been, but I have edited hundreds of pages over the last few months and never found a pattern as to why it fails or not. > On the test document: I went to page 22 and the top graphic deleted with no problems. The bottom graphic kicked me to the beginning of the document. On page 24, it was opposite. The deleting the top graphic kicked me to the beginning of the document and the bottom one did not. > I was very careful to select the graphic, not move the cursor and then hit delete. OK, I think I can attempt to clarify the steps here: 0. Open document, wait for it to load completely 1. Don't click anywhere in the text; open the Navigator sidebar and double-click on Image13 (in the "Drawing objects" section) 2. Press "Delete" on the keyboard 3. Repeat with another drawing object, but use Ctrl + X to cut it. Actual results: Viewport jumps back to the top of the document (the last position of the text cursor) when deleted but stays put when cutting. Expected result: When deleting the drawing object, the text cursor is placed at its anchor (and the viewport only moves if it is not visible). I get the same result with all other drawing objects. Note that I also see this with version 6.3 so I don't think it is a regression, it might have always been like that. Version: 6.3.6.2 Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; Locale: en-AU (en_AU.UTF-8); UI-Language: en-US Calc: threaded This is not specific to DOCX, the same document saved as ODT shows the same behaviour. Dan, could you please test these steps and confirm that it behaves as decribed?
and after the <Ctrl>+X cut, what happens if you start typing text? Ewww, that's annoying. The text cursor correctly lands at the spot where the cut frame had been, but it jumps to top of document when any frame is just deleted. And it seems a little unreliable, sometimes cursor will land there with a deletion. Affecting work in both Sidebar Navigator and with mouse click-selection. @Jim, here's one you might have fun with.
The Ctrl-X observation was very helpful! Here is a patch that makes the cursor position behave like Cut for Delete and Backspace: https://gerrit.libreoffice.org/c/core/+/140036
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dced115279b953735040663f71a2e848762672d7 tdf#150589 Set cursor to better position after deleting a drawing It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I can verify it as fixed in: Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: 3752e8eaa81a50b018669d03dc59b3753a5248ef CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Thank you Jim!