Bug 150848 - Tab key should ignore indent
Summary: Tab key should ignore indent
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha1+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Tab-Character
  Show dependency treegraph
 
Reported: 2022-09-07 19:21 UTC by TorrAB
Modified: 2022-12-05 09:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
file with bad tab response (15.66 KB, application/vnd.oasis.opendocument.text)
2022-09-07 19:21 UTC, TorrAB
Details
file with good tab response (17.01 KB, application/vnd.oasis.opendocument.text)
2022-09-07 19:23 UTC, TorrAB
Details
file with various tabs and indents. (18.91 KB, application/vnd.oasis.opendocument.text)
2022-09-25 20:17 UTC, TorrAB
Details
Screencast (35.62 KB, image/gif)
2022-10-07 09:20 UTC, Heiko Tietze
Details
file with indent and tabStop (11.45 KB, application/vnd.oasis.opendocument.text)
2022-11-30 22:29 UTC, TorrAB
Details
file with filled tabStops in 4 different paragraph styles (28.91 KB, application/vnd.oasis.opendocument.text)
2022-12-03 00:51 UTC, TorrAB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TorrAB 2022-09-07 19:21:49 UTC
Created attachment 182290 [details]
file with bad tab response

In tabBad.odt, put cursor at beginning-of-line (position 0),
● hit Tab: cursor moves to indent at 6.4 mm; aaa moves to  tab stop with underline as fill character from 6.4 mm to 12.7 mm: cursor is at 6.4 mm, not at 12.7 mm, where aaa is.
● hit arrowRight: cursor moves to indent at 6.4 mm, where aaa is; now, hit Tab: cursor and aaa move to tabStop at 12.7 mm, with (as expected) fill character from 6.4 mm to 12.7 mm.
	This inconsistent, bizarre behaviour, with partial filling from indent at 6.4 mm to tabStop at 12.7 mm, could be avoided if the Tab key ignored indents and led to tabStops only.
	Conclusion: Tab key should ignore indents and (as its name implies) respond to tabStops only.
	tabBag.odt behaves correctly because there is a tabStop at the indent (at 6.4 mm).
Comment 1 TorrAB 2022-09-07 19:23:20 UTC
Created attachment 182291 [details]
file with good tab response
Comment 2 Dieter 2022-09-22 07:39:42 UTC
I confirm the described behaviour, but for me behaviour is consistent: tab key should insert an new tab until the next tab stop while right arrow just moves the cursor to the right. So we have two different keys with two different functions and different results are expected.

But I also see one question: Why should tab key include jumping to indent (as it does at the moment)? For me this is a valid question.

TorrAB, do yopu agree so that we can reduce bug to that question and ask design-team?
=> NEEDINFO
Comment 3 TorrAB 2022-09-22 14:15:06 UTC
(In reply to Dieter from comment #2)
> I confirm the described behaviour, but for me behaviour is consistent: tab
> key should insert an new tab until the next tab stop while right arrow just
> moves the cursor to the right. So we have two different keys with two
> different functions and different results are expected.
> 
> But I also see one question: Why should tab key include jumping to indent
> (as it does at the moment)? For me this is a valid question.
> 
> TorrAB, do you agree so that we can reduce bug to that question and ask
> design-team?
> => NEEDINFO

Yes. This was my conclusion: Tab key should ignore indents and respond only to tabStops.
Comment 4 Dieter 2022-09-22 14:21:37 UTC
(In reply to TorrAB from comment #3)
> Yes. This was my conclusion: Tab key should ignore indents and respond only
> to tabStops.

So let's ask Design-Team for further input and decision.
Comment 5 Dieter 2022-09-22 14:23:29 UTC
If this enhancement would affect layout of older documents, I wouldn't support it.
Comment 6 Heiko Tietze 2022-09-23 08:02:57 UTC
I cannot compile the STR into a meaningful bug report or proposal for improvement. And the sample document has quite many modifications to the default.

In general and as Dieter commented, the tab key inserts a tab (with attributes set in paragraph style). Going forth and back per arrow key should (and does) go to the position before and after the tab. So I don't see an issue.
Comment 7 TorrAB 2022-09-25 20:13:36 UTC
(In reply to Heiko Tietze from comment #6)
> the sample document has quite many modifications to the default.
● Does Writer get confused by many modifications? How many?
> 
> I don't see an issue.

● You might see it with the new document, tabs6.odt:
*Elements AA, BB, BC, HH and DD conform to specs and user expectations;
*CC looks like BB and DD but was obtained by hitting the TabKey twice —unexpected. If TabKey had ignored the indent, a single TabKey hit would have entered a Tab filled by underline beginning at the left margin (according to hangingIndent definition), like AA or BC.
Comment 8 TorrAB 2022-09-25 20:17:04 UTC
Created attachment 182670 [details]
file with various tabs and indents.
Comment 9 QA Administrators 2022-09-26 03:30:43 UTC Comment hidden (obsolete)
Comment 10 Dieter 2022-09-27 16:35:56 UTC
(In reply to Heiko Tietze from comment #6)
> I cannot compile the STR into a meaningful bug report or proposal for
> improvement.

Steps:
1. Create a paragraph with an indent
2. Place cursor at beginning of paragraph and press tab-key

Actual result:
Cursor position at indend

Proposal
Cursor position at first tab

But working on this, I've also detected bug 151203. Perhaps it might be responsible for some trouble decribed here.
Comment 11 Heiko Tietze 2022-09-28 08:58:32 UTC
(In reply to Dieter from comment #10)
> 1. Create a paragraph with an indent
> 2. Place cursor at beginning of paragraph and press tab-key
> 
> Actual result:
> Cursor position at indend
> 
> Proposal
> Cursor position at first tab

Inserts a tab for me and places the cursor behind the arrow respectively keeps it in front of the text.
Comment 12 Dieter 2022-10-01 04:40:55 UTC
(In reply to Heiko Tietze from comment #11)
> Inserts a tab for me and places the cursor behind the arrow respectively
> keeps it in front of the text.

Yes, but cursor position is at indent position and not at position of first tab stop.
Comment 13 TorrAB 2022-10-01 20:18:38 UTC
*** Bug 151203 has been marked as a duplicate of this bug. ***
Comment 14 Heiko Tietze 2022-10-07 09:20:43 UTC
Created attachment 182898 [details]
Screencast

(In reply to Dieter from comment #10)
> Steps:
> 1. Create a paragraph with an indent
> 2. Place cursor at beginning of paragraph and press tab-key
> 
> Actual result:
> Cursor position at indend

When I enter a literal tab, the cursor is placed after this character.
Comment 15 Heiko Tietze 2022-11-24 08:58:16 UTC
We discussed the topic in the design meeting.

Issue is that tabs always adopt the indentation for the first line, like 5cm indent, tab = 5cm. However, this convenience feature works only until the tab stop is defined. If, for example, the tab stop is set to 1cm it will not take the indentation. It happens only if no particular tab stop is defined.

I see no use case where this _feature_ breaks the workflow. On the contrary it is very convenient for beginners to "indent per tab". So my take here is WF/NAB.

If you disagree please reopen. We would have to define a tab stop on the default PS, which likely results in trouble in other scenarios.
Comment 16 TorrAB 2022-11-30 22:29:05 UTC
Created attachment 183926 [details]
file with indent and tabStop
Comment 17 TorrAB 2022-11-30 22:34:52 UTC
(In reply to Heiko Tietze from comment #15)
● ‘It happens only if no particular tab stop is defined.’
False; it happens also if a particular tab stop is defined beyond the indent.
● ‘It is very convenient for beginners to "indent per tab"’
Why would a beginner (or you) expect the cursor to obey an indent that does not even apply to the current line, where the FirstLineIndent is negative?

In tabBal.odt, the 1st TabKey hit gives a ‘normal’ tab, because the cursor stops at the indent; only the 2nd TabKey hit gives the underlined tab; but this underlined tab begins at the indent, not at the margin, where the line begins.
Comment 18 Heiko Tietze 2022-12-01 07:45:41 UTC
This example is again overly complex. Please define STR like: use PS "Text Body", change attribute X to Y, apply <Foo> to paragraph.

To repeat the conclusion, if no tab stop is defined it uses the indentation, which makes sense to me. You are free to challenge this and to suggest alternative. If you reopen, please add your expectation.
Comment 19 TorrAB 2022-12-03 00:47:28 UTC
tab3.odt (attached) may look ‘overly complex’ because it involves 4 paragraph styles, but each one is simple: one tabStop. Comments are included.

"indent per tab" is not ‘very convenient for beginners’ (Compare CCtabbed and DD.); rather, it'a bizarre, ill-conceived, unexpected complication of a very simple action: Go-to-tabStop

My expectations? Hit a TabKey and get a filled tab from the beginning-of-line to the next tabStop, in any paragraph style. And this is impossible with HangingIndent if the tabStop is beyond the indent.
Comment 20 TorrAB 2022-12-03 00:51:17 UTC
Created attachment 183966 [details]
file with filled tabStops in 4 different paragraph styles