Issue 89821

Summary: Multi-line text controls loose the current selection when the parent window loses focus
Product: Base Reporter: timrichardson <tim>
Component: codeAssignee: marc.neumann
Status: CLOSED FIXED QA Contact: issues@dba <issues>
Severity: Trivial    
Priority: P3 CC: drewjensen.inbox, issues
Version: OOo 2.4.0Keywords: usability
Target Milestone: OOo 3.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
test document none

Description timrichardson 2008-05-23 03:20:04 UTC
I have a one-table database which includes a memo field.
I have a form to edit records.
When copying some text from another application to paste into the middle of
existing text in the memo field, I observe that the entire contents of the memo
field is deleted and then the copied text is pasted. 
It is as if before the paste, the entire existing text is automatically selected.
I observe the correct behaviour in normal text fields. 

The bug can be simply replicated by choosing one word in a memo field, selecting
it and copying it, deselecting, and then pasting back into the memo field. This
replaces the entire contents of the memo field with the one word selected.
Comment 1 drewjensen.inbox 2008-05-23 05:47:53 UTC
Tested using 2.4 & 3.0 m_13, WIN XP

Here is what I find.

When the focus is changed from noe control to another on a form by tabbing the 
entire contents of the control is automatically selected. The behavior is in 
other words consistent for all controls without regards as to individual data 
type or properties of the control.

When focus is switched between windows the behavior of the controls is not 
fully consistent.

Open a form and place your curser in (set focus to ) a text control that is 
configured for Text type = Single-line. Switch to a different window and switch 
back, the cursor postion in the control remains as it was before the switch 
away and back. 

Now place the curser into a text control where Text type = Multi-Line (what you 
have for memo fields in other words) and switch to another window. Now when you 
switch back to the form the entire contents of the control is selected. In 
other words they act as if the focus has just moved to the control by tabbing 
to it.

Changing the summary field to reflect this then - it is not that the copy paste 
is ill behaved rather it is that the current selection in a multi-line text 
control is lost when the uses switches to another window. 

To see this download the attached test document.
Open the form in the file.
Go to the field for country and use your mouse to select only a portion of the 
word "Australia" - now togle to a different window.
Toggle back to the form window. You see that the same selection you created is 
still active.

Now - select part of the text in the Comment field.
Toggle to another window.
Toggle back to the form window - the entire contents of the Comment field is 
selected.
Comment 2 drewjensen.inbox 2008-05-23 05:49:28 UTC
Created attachment 53866 [details]
test document
Comment 3 Frank Schönheit 2008-06-18 14:45:18 UTC
hard to tell which one is the correct behavior - losing or keeping the selection
on focus loss -, but yes, it's inconsistent at least.
Comment 4 timrichardson 2008-06-19 00:42:01 UTC
In 2.4.1 on Ubuntu 8.04 the problem no longer exists. I can copy and paste from
external applications into the form without having to replace the existing contents.
Comment 5 drewjensen.inbox 2008-06-19 02:46:32 UTC
I just tested this with 2.4.1, supplied by Canonical, and DEV300 m_19 from OO.o
both under Ubuntu 8.04 (Hardy) and the behavior has not changed.
Comment 6 Frank Schönheit 2008-12-06 20:24:56 UTC
I'd say this is a usability bug.
Comment 7 Frank Schönheit 2008-12-17 19:59:29 UTC
fixed in CWS dba32a

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba32a
Comment 8 Frank Schönheit 2009-02-26 12:05:55 UTC
fs->msc: please verify in CWS dba32a
Comment 9 Frank Schönheit 2009-02-26 12:32:00 UTC
targeting to 3.2, since the fix is part of a CWS aiming for this release
Comment 10 marc.neumann 2009-03-30 09:35:31 UTC
verified in CWS dba32a

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba32a
Comment 11 drewjensen.inbox 2009-06-01 04:26:14 UTC
Checked w/ DEV300_m49

Closing