Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018072Openbravo ERPA. Platformpublic2011-07-23 08:332011-10-12 01:59
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
3.0MP4 
Core
No
0018072: Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
The code which handles the focus (and auto-select of values) in form and grid has the following problems:
- it was not using standard smartclient features
- there is duplicate code

This resulted in code which was unclear and unpredictable behavior (see all the issues related to focus handling and auto-select of values).
See related issues
No tags attached.
has duplicate defect 00180573.0MP2 closed mtaal When form opens the form first scrolls down and then up 
related to defect 00167303.0MP3 closed mtaal Clicking a field with values does not select current contents 
related to defect 00181173.0MP2 closed mtaal Typing a new value in an empty field the first character is deleted and needs to be retyped 
blocks defect 00180863.0MP4 closed mtaal When pressing tab in suggestion box, field displayed through displaylogic is skipped 
blocks defect 00185003.0MP4 closed mtaal "Sales Forecast" -> "Lines" -> "Planned Date" calendar date picker doesn't work always 
Issue History
2011-07-23 08:33mtaalNew Issue
2011-07-23 08:33mtaalAssigned To => mtaal
2011-07-23 08:33mtaalModules => Core
2011-07-23 08:34mtaalRelationship addedrelated to 0018057
2011-07-23 08:37mtaalNote Added: 0039337
2011-07-23 08:38mtaalNote Added: 0039338
2011-07-23 08:40mtaalRelationship deletedrelated to 0018057
2011-07-23 08:40mtaalRelationship addedhas duplicate 0018057
2011-07-23 16:34hgbotCheckin
2011-07-23 16:34hgbotNote Added: 0039340
2011-07-24 05:59hgbotCheckin
2011-07-24 05:59hgbotNote Added: 0039341
2011-07-26 17:22hgbotCheckin
2011-07-26 17:22hgbotNote Added: 0039400
2011-07-26 23:02hgbotCheckin
2011-07-26 23:02hgbotNote Added: 0039415
2011-08-01 11:37psarobeStatusnew => scheduled
2011-08-01 11:37psarobeTarget Version3.0MP2 => 3.0MP3
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039669
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039670
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039691
2011-08-01 14:21hudsonbotCheckin
2011-08-01 14:21hudsonbotNote Added: 0039698
2011-08-01 16:09mtaalRelationship addedrelated to 0016730
2011-08-01 17:55mtaalRelationship addedrelated to 0018117
2011-08-03 11:15psarobeTarget Version3.0MP3 => 3.0MP2
2011-08-04 10:25psarobeTarget Version3.0MP2 => 3.0MP3
2011-08-31 09:42mtaalTarget Version3.0MP3 => 3.0MP4
2011-09-18 12:53mtaalTarget Version3.0MP4 => 3.0MP5
2011-09-27 09:20mtaalTarget Version3.0MP5 => 3.0MP4
2011-09-27 09:53mtaalRelationship addedblocks 0018086
2011-09-27 09:53mtaalRelationship addedblocks 0018500
2011-09-27 09:56hgbotCheckin
2011-09-27 09:56hgbotNote Added: 0041299
2011-09-27 09:56hgbotStatusscheduled => resolved
2011-09-27 09:56hgbotResolutionopen => fixed
2011-09-27 09:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7d3eaa3a17c45de0256302f2bee25b8984e722fc [^]
2011-09-28 07:07hgbotCheckin
2011-09-28 07:07hgbotNote Added: 0041332
2011-10-04 16:04marvintmStatusresolved => closed
2011-10-12 01:59hudsonbotCheckin
2011-10-12 01:59hudsonbotNote Added: 0041711
2011-10-12 01:59hudsonbotCheckin
2011-10-12 01:59hudsonbotNote Added: 0041718

Notes
(0039337)
mtaal   
2011-07-23 08:37   
In the past year about 50 issues have been reported on focus handling:

https://issues.openbravo.com/search.php?project_id=1&search=focus&handler_id=135&sticky_issues=off&sortby=last_updated&dir=DESC&hide_status_id=-2&custom_field_12[]=&custom_field_12[]=1&custom_field_12[]=1 [^]
(0039338)
mtaal   
2011-07-23 08:38   
See also this smartclient thread:
http://forums.smartclient.com/showthread.php?t=17990 [^]
(0039340)
hgbot   
2011-07-23 16:34   
Repository: erp/devel/pi
Changeset: de806a497fba0a09b100e05120c70269f9b5eb18
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Jul 23 16:34:13 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/de806a497fba0a09b100e05120c70269f9b5eb18 [^]

Related to issue 18072, Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
Changes:
- set selectOnFocus to true as a default
- cleaned up code, removed duplicate code
- got rid of async delayed calls to solve issues (results in unpredictable behavior)
- solved a small issue that moving to the next line in grid editing gave an error in a field
- added store and restore focused item behavior to form when creating section items, and when saving a record
- restore focus after a form gets re-enabled after a FIC call in the correct way now

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-section.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-textarea.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0039341)
hgbot   
2011-07-24 05:59   
Repository: erp/devel/pi
Changeset: df0fc02d0865b0f4734c76f0fe6bf04680995f92
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Jul 24 05:55:51 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/df0fc02d0865b0f4734c76f0fe6bf04680995f92 [^]

Related to issue 18072 Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
Solve this: open a form, click on a combo (not the first one), select something from the combo, the focus is moved to the first field instead of the field after the combo

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0039400)
hgbot   
2011-07-26 17:22   
Repository: erp/devel/pi
Changeset: b6be50096d402290f68411b13935384f4eb8a3b3
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jul 26 17:20:04 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b6be50096d402290f68411b13935384f4eb8a3b3 [^]

Related to issue 18072 Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
For a list item having select on focus resulted in only one character displaying, solved this by explicitly selecting the value
The focus in next item was incorrectly setting the focus to the first error field

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0039415)
hgbot   
2011-07-26 23:02   
Repository: erp/devel/pi
Changeset: 71df089998c4d75aed1add9eeaa135da8ef40ab0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jul 26 23:01:25 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/71df089998c4d75aed1add9eeaa135da8ef40ab0 [^]

Related to issue 18072: Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
List item was showing strange behavior on select, field change event should only be fired when a value is
selected explicitly from the picklist

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
---
(0039669)
hudsonbot   
2011-08-01 14:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cf2afed6e8ef [^]

Maturity status: Test
(0039670)
hudsonbot   
2011-08-01 14:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cf2afed6e8ef [^]

Maturity status: Test
(0039691)
hudsonbot   
2011-08-01 14:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cf2afed6e8ef [^]

Maturity status: Test
(0039698)
hudsonbot   
2011-08-01 14:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cf2afed6e8ef [^]

Maturity status: Test
(0041299)
hgbot   
2011-09-27 09:56   
Repository: erp/devel/pi
Changeset: 7d3eaa3a17c45de0256302f2bee25b8984e722fc
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 27 09:55:42 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7d3eaa3a17c45de0256302f2bee25b8984e722fc [^]

Fixes issue 18072: Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
Make use of standard smartclient functionality for focus handling, fixes:
Fixes issue 18072: Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior
Fixes issue 18500: "Sales Forecast" -> "Lines" -> "Planned Date" calendar date picker doesn't work always
Fixes issue 18086: When pressing tab in suggestion box, field displayed through displaylogic is skipped

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0041332)
hgbot   
2011-09-28 07:07   
Repository: erp/devel/pi
Changeset: 9705f4af28aa8abb7c479a02fc1695f0ba7198a1
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Sep 28 07:06:25 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9705f4af28aa8abb7c479a02fc1695f0ba7198a1 [^]

Related to issue 18072: Focus handling in form and grid editing needs to be cleaned up, results in unpredictable behavior

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0041711)
hudsonbot   
2011-10-12 01:59   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9bd2b5c2d982 [^]

Maturity status: Test
(0041718)
hudsonbot   
2011-10-12 01:59   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9bd2b5c2d982 [^]

Maturity status: Test