Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 33241 - non-editable textfields show focus
Summary: non-editable textfields show focus
Status: RESOLVED DUPLICATE of bug 71765
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 33232 57369 65322 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-26 06:48 EST by Andre Weinand CLA
Modified: 2004-08-11 06:54 EDT (History)
4 users (show)

See Also:


Attachments
Property dialog (68.05 KB, image/jpeg)
2003-02-27 12:35 EST, Andre Weinand CLA
no flags Details
patch for Text.java (743 bytes, patch)
2004-07-04 16:19 EDT, Andre Weinand CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Weinand CLA 2003-02-26 06:48:11 EST
RC1
- open properties dialog on project folder
- open "Info" page
- click in "Path" field
Observe: the field gets the blue focus frame despite the fact that it does not accept any 
keyboard input.
Comment 1 Erich Gamma CLA 2003-02-27 05:44:38 EST
*** Bug 33232 has been marked as a duplicate of this bug. ***
Comment 2 Veronika Irvine CLA 2003-02-27 12:00:25 EST
Not accepting keyboard input does not mean you can't get focus.

e.g., for accessibilty, you may wish to allow users to navigate to a read only 
field by the keyboard to select and copy text (using accelerators).  The 
visiual indicator that focus is the text field is still required I think.
Comment 3 Andre Weinand CLA 2003-02-27 12:35:01 EST
Yes, but in this case the following is wrong or doesn't work:
- the background of the field is white and looks like it would allow input,
- tabbing between fields doesn't work,
- selecting the contents with the keyboard doesn't work,
- the focus border is partially clipped (see attachment).
Comment 4 Andre Weinand CLA 2003-02-27 12:35:53 EST
Created attachment 3757 [details]
Property dialog
Comment 5 Steve Northover CLA 2003-03-03 17:02:14 EST
All we do is set the kTXNReadOnlyMask.  It's up to the Macintosh to decide how 
a read only text field behaves and looks.
Comment 6 Andre Weinand CLA 2003-03-04 04:26:37 EST
If I remember correctly text fields don't draw their focus rings themself.
So SWT decides when to draw focus and when not.

I suggest not to draw the focus ring for readonly fields,
which would make my comment #3 obsolete.

However if the focus is drawn the problems in comment #3 are valid.


Comment 7 Andre Weinand CLA 2003-03-04 16:51:14 EST
Reopening. See comment #6
Comment 8 Steve Northover CLA 2003-03-04 17:00:07 EST
Here is our thinking:  If the control has focus, then it should have the focus 
ring despite the fact that it may or may not do anything with the keys that 
you type.

If you agree, then SSQ should close this PR.
Comment 9 Andre Weinand CLA 2003-03-05 04:13:18 EST
I do not agree.
I've listed the options to resolve this in comment #6.
Comment 10 Andre Weinand CLA 2004-04-04 18:35:05 EDT
*** Bug 57369 has been marked as a duplicate of this bug. ***
Comment 11 Alex Blewitt CLA 2004-04-04 18:56:16 EDT
Note that this allows the title of wizards to be selected, which let's face it, no-one will want to copy.

Whether this should be fixed on an SWT-wide scale, or whether it should be the case that the wizard 
title should not allow input (is it possible for something to be disabled, in the same way as in Swing/
AWT?) then this could also be fixed on a label-by-label basis.

However, the net effect -- that it is possible for the title of a wizard pane to have focus -- is something 
(reported in bug 57369) is undesirable and should be stopped at the low or high level.
Comment 12 Andre Weinand CLA 2004-04-15 04:11:36 EDT
I just noticed that in the "About Eclipse Platform" dialog the text is selectable but does not show a focus 
border. So it is possible.
Comment 13 Pat McCarthy CLA 2004-06-02 10:42:01 EDT
*** Bug 65322 has been marked as a duplicate of this bug. ***
Comment 14 Eric Zimmerman CLA 2004-06-11 13:42:03 EDT
Andre Weinand said "I suggest not to draw the focus ring for readonly fields..."

Then how do you tab to a read only combo box?  I want the user to be able to 
select a field but not edit, being able to tab to it would be important.  

This whole tab thing really makes wizards buggy...Isn't there a SWT.NO_FOCUS 
sytle bit that you can set on widgets to fix the underlying wizard issue?

Eric
Comment 15 Andre Weinand CLA 2004-07-04 16:17:28 EDT
I did not suggest to disable the focus border for readonly Combo boxes.
Comment 16 Andre Weinand CLA 2004-07-04 16:19:51 EDT
Created attachment 12960 [details]
patch for Text.java
Comment 17 Andre Weinand CLA 2004-08-11 06:54:48 EDT

*** This bug has been marked as a duplicate of 71765 ***