Bug 284072 - clear text icon "X>" is hiding Hebrew text in RTL mode
Summary: clear text icon "X>" is hiding Hebrew text in RTL mode
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: 4.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: rtl
: 279052 280567 322456 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-15 11:01 UTC by Nadav Kavalerchik
Modified: 2024-09-15 20:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11
Sentry Crash Report:


Attachments
Hebrew text is covered with "Clear Text" icon (98.41 KB, image/png)
2011-10-15 11:04 UTC, Nadav Kavalerchik
Details
RTL and clear icon (2.55 KB, image/png)
2020-11-16 12:14 UTC, medin
Details
Okular automatic RTL and LTR (774.13 KB, video/mp4)
2021-05-25 14:42 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nadav Kavalerchik 2011-10-15 11:01:58 UTC
Version:           4.7 (using KDE 4.7.1) 
OS:                Linux

When typing Hebrew text (RTL Mode), the "Clear Text" icon ("X>") is covering the beginning of the text (See attached screen capture)

Please display the "Clear Text" icon justified to the left of the Input Text Box when in RTL mode. Where the text is typed from right to left. so the icon will not cover the text.

Reproducible: Didn't try

Steps to Reproduce:
1. Press Alt-F2 to open the krunner
2. Switch keyboard layout to Hebrew (Or Arabic) 
3. Type some text
4. You will now see this issue. (Icon covers text)

Actual Results:  
Text is not covered by "Clear text icon"

Expected Results:  
Text should not covered by "Clear text icon"
and if possible, justify the icon to the left side of the text input box
Comment 1 Nadav Kavalerchik 2011-10-15 11:04:14 UTC
Created attachment 64537 [details]
Hebrew text is covered with "Clear Text" icon

Screen capture of this issue
Comment 2 Afief Halumi 2013-06-01 15:44:03 UTC
Affects Arabic text too. From reading the code of KLineEdit it seems that when the text alignment is automatically changed(by entering RTL text such as Hebrew or Arabic) the function updateClearButton is not called.

I'm running KDE 4.10.2, the bug is especially annoying when searching for non-latin contacts in a contact list.
Comment 3 Christoph Feck 2013-06-16 01:19:49 UTC
Ah, you mean KDE is not set to RTL mode by default, but the widget only temporarily switches when RTL characters are entered?
Comment 4 Nadav Kavalerchik 2013-06-16 05:31:52 UTC
Yes
Comment 5 Christoph Feck 2013-07-17 11:47:03 UTC
*** Bug 322456 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2013-07-23 11:32:49 UTC
Git commit 7e663c8d11c306dffbf7e9ba32744a94f1e4bed9 by Christoph Feck.
Committed on 23/07/2013 at 11:30.
Pushed by cfeck into branch 'KDE/4.11'.

Update clear button position on layout direction changes
FIXED-IN: 4.11

M  +4    -0    kdeui/widgets/klineedit.cpp

http://commits.kde.org/kdelibs/7e663c8d11c306dffbf7e9ba32744a94f1e4bed9
Comment 7 Christoph Feck 2013-12-16 22:05:33 UTC
*** Bug 280567 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2013-12-29 22:05:48 UTC
*** Bug 279052 has been marked as a duplicate of this bug. ***
Comment 9 Dotan Cohen 2013-12-30 12:39:17 UTC
Thank you for the fix, Chris!
Comment 10 medin 2020-11-16 12:13:30 UTC
The problem is still persistent on Plasma 5.20.2
Comment 11 medin 2020-11-16 12:14:29 UTC
Created attachment 133377 [details]
RTL and clear icon

Operating System: Manjaro Linux
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.4.74-1-MANJARO
OS Type: 64-bit
Comment 12 Omeritzics 2021-05-25 13:10:27 UTC
This problem seems to be fixed on Plasms 5.21.
Comment 13 medin 2021-05-25 14:42:04 UTC
(In reply to Omeritzics from comment #12)
> This problem seems to be fixed on Plasms 5.21.

Not completely resolved, it's just temporary (wrong) solution, the correct way RTL languages should be treated is to show clear icon at left and typing start from right, but now RTL are treated as LTR languages. The correct way to address this problem is to have the ability to change automatically the layout of textbox when focus is catched and according to current selected keyboard layout the layout of focused textbox will change to match RTL or LTR.
It seems Okular (search) is the only that is implementing the correct solution, see attached video for more info.
Comment 14 medin 2021-05-25 14:42:53 UTC
Created attachment 138775 [details]
Okular automatic RTL and LTR
Comment 15 Christoph Cullmann 2024-09-14 17:06:58 UTC
Hi,

kdelibs (version 4 and earlier) is no longer maintained since a few years.

KDE Frameworks 5 or 6 might already have resolved this bug.

If not, please re-open against the matching framework if feasible or against the application that shows the issue.

We then can still dispatch it to the right Bugzilla product or component.

Greetings
Christoph Cullmann
Comment 16 medin 2024-09-15 20:35:24 UTC
(In reply to Christoph Cullmann from comment #15)
> Hi,
> 
> kdelibs (version 4 and earlier) is no longer maintained since a few years.
> 
> KDE Frameworks 5 or 6 might already have resolved this bug.
> 
> If not, please re-open against the matching framework if feasible or against
> the application that shows the issue.
> 
> We then can still dispatch it to the right Bugzilla product or component.
> 
> Greetings
> Christoph Cullmann

The clear icon is fixed for now on Plasma 6.1.5.

There is still a problem with how the text is aligned when you switch to Ara/Heb layout then start typing RTL text inside Plasma launcher, KRunner... the text is left aligned.
But other apps like Okular, Konsole... right align typed RTL text in serch fields.