Bug 137603 - Keep cursor position on selection
Summary: Keep cursor position on selection
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 68674 117711 146350 156369 (view as bug list)
Depends on:
Blocks: Scrolling-PageUpDown
  Show dependency treegraph
 
Reported: 2020-10-19 20:55 UTC by Telesto
Modified: 2023-08-17 09:44 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (383.63 KB, application/vnd.oasis.opendocument.text)
2020-10-19 20:56 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-10-19 20:55:49 UTC
Description:
Unwanted scroll to bottom when changing language of document (CTRL+A Language change)

Steps to Reproduce:
1. Open the attached file
2. CTRL+A
3. Pick a different language in the status bar

Actual Results:
Moving to cursor position

Expected Results:
If up to me, no scroll


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 94e6e140491de31c0788c91af855a75a3bb12709
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-10-19 20:56:08 UTC
Created attachment 166521 [details]
Example file
Comment 2 pavlog 2020-11-19 21:24:02 UTC
Thank you for reporting the bug. I can repro it in 

Version: 7.1.0.0.alpha1+ (x64)
Build ID: 91c5642bf0ee48ff91181d779c3a84c768f340df
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

As a result cursor jumps to the end of the document. Suppose that resolving of it can looks like an enhancement. UX Team -- please take a look at this issue. Thanks!
Comment 3 Heiko Tietze 2020-11-20 10:01:43 UTC
Selecting all means the cursor moves to the end (see where it blinks). And consequently all applied formatting makes the focus scroll down to the cursor.

Tools > Language > For All Text does not scroll

=> NAB
Comment 4 Telesto 2020-11-20 11:14:58 UTC
(In reply to Heiko Tietze from comment #3)
> Selecting all means the cursor moves to the end (see where it blinks). And
> consequently all applied formatting makes the focus scroll down to the
> cursor.
> 
> Tools > Language > For All Text does not scroll
> 
> => NAB

Not totally convinced, yet. 
CTRL+A does place cursor on last page, but doesn't scroll. If you're vision is correct it should scroll to the last immediately. Not after applying they change. At least as far I'm concern.

They whole scroll to cursor thing is delicate topic; not totally agreeing with Mike his opinion. If though moving to area of change makes some sense.

However CTRL+A to followed by language setting scrolling to bottom has no benefit. Is only a discomfort, disturbing workflow kind of thing. At least that's how I perceive it.

However this is only a variant of number of those.. where it's always about the same thing. Sometimes think it should simply not scroll to cursor (it's a user flaw to change things with cursor on different spot; not something to be correct programmatically). As they feature isn't to helpful in number of cases (I would even consider it disturbing).

However someone find surely a case here this rule doesn't hold true :-) Or there is some room to make argument. But I tend to prefer flip from default. Don't scroll to cursor, except. Instead of scroll to cursor except.

At least based on limited knowledge (didn't encounter much area why scroll to cursor makes sense, but maybe not even noticed that because it feels natural en happens automatically)? So I only get annoyed by my own proposal afterwards :P
Comment 5 Heiko Tietze 2020-11-20 12:17:11 UTC
(In reply to Telesto from comment #4)
> CTRL+A does place cursor on last page, but doesn't scroll. If you're vision
> is correct it should scroll to the last immediately. Not after applying they
> change. At least as far I'm concern.

Consequently yes. Compare the behavior with any other tool. Sure, we could remember the current position on select all, which likely solves this issue too, but don't we diverge from the standard then?
Comment 6 Telesto 2020-11-20 14:57:40 UTC
(In reply to Heiko Tietze from comment #5)
> (In reply to Telesto from comment #4)
> > CTRL+A does place cursor on last page, but doesn't scroll. If you're vision
> > is correct it should scroll to the last immediately. Not after applying they
> > change. At least as far I'm concern.
> 
> Consequently yes. Compare the behavior with any other tool. Sure, we could
> remember the current position on select all, which likely solves this issue
> too, but don't we diverge from the standard then?

You're getting me confused :P. CTRL+A in large document does not scroll in LibreOffice (nor in Word, which I see as they desired behaviour) Except this not in line with they theory of scrolling to character.. 

Next topic is the scroll on language change after CTRL+A. Not happening in Word. Not that should emulate Word necessarily on all aspects, but more an indicator :P. And I like the Word behaviour more.. 

But this way I'm ruining Mike his 'principles/model on the matter. Not that care to much about that (as I'm not a fan of his model). But one of my principles is consistency :-). However this ends up to become political.. as I expect people to complain about they CTRL+A behaviour so we end up discussion the model again :P

Of course ruining my strategy right now :-). But dislike deceiving.
Comment 7 Heiko Tietze 2020-11-27 10:39:53 UTC
SelectAll places the cursor at the end of the document; same happens on MSO. Any operation like changing the language make the view jump to the cursor position.

One possible solution is to change the view directly after SelectAll. The better approach might be to keep the cursor where it is.
Comment 8 Aron Budea 2021-08-07 13:13:10 UTC
Already in 3.3.0.
Comment 9 Michael Stahl (allotropia) 2023-05-08 16:40:35 UTC
*** Bug 146350 has been marked as a duplicate of this bug. ***
Comment 10 Heiko Tietze 2023-07-21 08:38:08 UTC
*** Bug 117711 has been marked as a duplicate of this bug. ***
Comment 11 Heiko Tietze 2023-07-21 08:38:22 UTC
*** Bug 68674 has been marked as a duplicate of this bug. ***
Comment 12 Heiko Tietze 2023-08-17 09:33:38 UTC
*** Bug 156369 has been marked as a duplicate of this bug. ***
Comment 13 Heiko Tietze 2023-08-17 09:44:50 UTC
Microsoft hides the caret on selection (happens in MSO as well as Notepad) while the caret remains visible on Linux (at least KDE's text editor Kate) and with LibreOffice. 

The adjustment to the caret position is done after the next key stroke. For example, the viewport doesn't change when selecting the paragraph to end per quad-click in MSO - the cursor jumps to the end (and potentially scrolls down) only with the next arrow right action.

Our implementation has the advantage of a better feedback before any interaction with the selection is done. While it might feel weird for users migrating from Microsoft, changing the behavior would be strange for long-term users too. My take => NAB/WF

(In reply to Heiko Tietze from comment #7)
> SelectAll places the cursor at the end of the document...
Made the topic broader; select all / ctrl+A in fact moves the caret to the end on all applications.