Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021307Openbravo ERPA. Platformpublic2012-08-03 13:552016-10-24 09:52
egoitz 
dbaz 
immediatemajoralways
closedfixed 
5
3.0MP13 
3.0MP153.0MP15 
AugustoMauch
Core
Production - QA Approved
2012-05-26
https://code.openbravo.com/erp/devel/pi/rev/f060d41ab218 [^]
yes
0021307: The focus oes not move for the following field from a field using a column with text reference
When creating or editing rows on grid view, using the tab key to navigate from the fields does not work properly. When clicking tab on a field using reference text the focus does not go to the next field.

-Login as system administrator
-Go to textinterfaces window
-edit a row
-Use tab key to go to the next fields.
*see that when pressing tab key having the focus on text field the focus does not go to the next field. The focus is lost
No tags attached.
related to defect 00163273.0RC5 closed mtaal It is not possible to fill the fields using Tab to navigate a Header 
related to defect 0034057 closed NaroaIriarte Wrong Tabulation Order in form fields in Organization window 
Issue History
2012-08-03 13:55egoitzNew Issue
2012-08-03 13:55egoitzAssigned To => alostale
2012-08-03 13:55egoitzModules => Core
2012-08-03 13:55egoitzResolution time => 1344290400
2012-08-03 14:11extraIssue Monitored: extra
2012-08-03 14:11alostaleAssigned Toalostale => AugustoMauch
2012-08-13 10:14heccamIssue Monitored: heccam
2012-08-21 12:32AugustoMauchNote Added: 0051423
2012-08-22 01:03dbazAssigned ToAugustoMauch => dbaz
2012-08-22 01:05dbazRegression level => Production - QA Approved
2012-08-22 01:05dbazRegression date => 2012-05-26
2012-08-22 01:05dbazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f060d41ab218 [^]
2012-08-22 01:05dbazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3738#r3738
2012-08-22 01:22dbazNote Added: 0051440
2012-08-22 01:29dbazNote Edited: 0051440bug_revision_view_page.php?bugnote_id=0051440#r3740
2012-08-22 01:35dbazClosed by => AugustoMauch
2012-08-22 01:38hgbotCheckin
2012-08-22 01:38hgbotNote Added: 0051441
2012-08-22 01:38hgbotStatusnew => resolved
2012-08-22 01:38hgbotResolutionopen => fixed
2012-08-22 01:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fb014b417c71367592af08d2257990f613bcbeb2 [^]
2012-08-22 01:43dbazStatusresolved => new
2012-08-22 01:43dbazResolutionfixed => open
2012-08-22 01:43dbazRelationship addedrelated to 0016327
2012-08-22 01:44dbazStatusnew => scheduled
2012-08-22 01:44dbazfix_in_branch => pi
2012-08-22 01:44dbazStatusscheduled => resolved
2012-08-22 01:44dbazResolutionopen => fixed
2012-08-22 09:27AugustoMauchNote Added: 0051443
2012-08-22 09:27AugustoMauchStatusresolved => closed
2012-08-22 09:27AugustoMauchFixed in Version => 3.0MP15
2016-10-24 09:52NaroaIriarteRelationship addedrelated to 0034057

Notes
(0051423)
AugustoMauch   
2012-08-21 12:32   
This issue is only reproducible using the obfuscated sources of smartclient (SNAPSHOT_v8.3d_2012-05-26/LGPL Deployment). Using the unobfuscated sources (SNAPSHOT_v8.3d_2012-05-26/LGPL Development Only ), the issue is not reproducible.
(0051440)
dbaz   
2012-08-22 01:22   
(edited on: 2012-08-22 01:29)
Initial clue provided by migueldejuana: the execution flow doesn't go through "cellEditEnd" of "ob-view-grid.js" when using obfuscated sources

After some research from this clue (comparing in each moment unobfuscated ListGrid.js vs ISC_Combined.js):

"cellEditEnd" function of "ob-view-grid.js" is called by "cellEditEnd" function of "isomotphic\client\widgets\ListGrid.js"

on the tab key press, this "cellEditEnd" function is called from "editorKeyPress" function (this doesn't happen in ISC_Combined.js)

this "editorKeyPress" function is called from "_popUpTextAreaItemKeyPress" function (this doesn't happen in ISC_Combined.js)

this "_popUpTextAreaItemKeyPress" function is set in "item.textAreaKeyDown = this._popUpTextAreaItemKeyDown;" inside "getEditItem" function (this "getEditItem" function is called also in ISC_Combined.js)

Debugging inside "getEditItem" function in parallel in both environments (obfuscated and unobfuscated), the problem is in the "this._popUpTextAreaEditorTypes" object definition: in the unobfuscated sources it has the "OBPopUpTextAreaItem: true" attribute but it is not present in the obfuscated sources. This fact, later in the same "getEditItem" function, is translated in that "item.textAreaKeyDown = this._popUpTextAreaItemKeyDown;" is never set due to an -if- statement including that.

Searching for "OBPopUpTextAreaItem" and/or "_popUpTextAreaItemKeyDown" in sources, it moves you directly here:

https://code.openbravo.com/erp/devel/pi/file/9c6fb1606fa2/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-textarea.js#l86 [^]

There is the problem source: an obfuscated variable set in a hardcoded way.
This variable should have been changed when Smartclient code gets updated, and of course, it should be taked into account for future upgrades.
The explanation of why this hardcoded variable is set there, is there too as a code comment.

(0051441)
hgbot   
2012-08-22 01:38   
Repository: erp/devel/pi
Changeset: fb014b417c71367592af08d2257990f613bcbeb2
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Aug 22 01:38:15 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fb014b417c71367592af08d2257990f613bcbeb2 [^]

Fixed issue 21307: Now the focus moves ok on tab key press
while editing a grid item with text reference (textarea)

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-textarea.js
---
(0051443)
AugustoMauch   
2012-08-22 09:27   
Code reviewed and verified in pi@fb014b417c71