Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null
| | | | | | |
Re: RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null [message #1385280 is a reply to message #1385260] |
Thu, 05 June 2014 06:57   |
Eclipse User |
|
|
|
I have an editor displaying a tree, double click on this tree open another editor containing several widgets, depending of the tree element clicked.
If a tree element has already been opened, the same editor instance is reused but content is recreated, meaning previous widgets are disposed and created again.
The crash occurs when I open an editor for a given tree elements, with combo inside this editor, then switch back to the tree editor, then reopen the same element, so the combo widget is disposed and created again, the crash occurs when the editor containing the combo takes focus.
Debuging the javascript, the error occurs in 72443 of rap-client.js :
var hasFocus = function( control ) {
var root = control.getFocusRoot();
var result = control.getFocused()
|| ( control.contains && control.contains( root.getFocusedChild() ) );
return result;
};
I suspect it allows the rwt.widget.DropDown to hide itself when parent widget has lost focus (in my case Combo).
What I can see with a javascript debugger, is if I have an editor with a combo displayed this hasFocus metchod is called every time I switch from an editor to another (through "interval" event in stacktrace) even editors without Combo, and it seems to be called only when I switch editor. The crash occurs when this event is called on the disposed combo when I reopen the editor that dispose the combo.
It occurs on chrome and firefox last version for both, I have not tested on IE
Hope I am quite clear
[Updated on: Thu, 05 June 2014 07:00] by Moderator
|
|
| |
Re: RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null [message #1385301 is a reply to message #1385282] |
Thu, 05 June 2014 09:34   |
Eclipse User |
|
|
|
In my scenario I isolate a simpler way to reproduce the crash I just need to open my editor with a Combo. Then when I close it so the Combo is disposed, the next thing I do on the UI crash it with same error
As I cannot reproduce it with simple code, I guess I am doing something wrong in my code, but I am lost as it occurs only if I have a combo widget, as I am doing the same thing whatewer widget I have in the editor
Here the last JSON response sent by the server before an error (after closing the editor with Combo inside)
{"head":{"requestCounter":8},"operations":[["destroy","w162"],["destroy","w161"],["set","w2",{"activeControl":"w2"}],["set","w25",{"children":["w40","w26","w27"]}],["set","w40",{"visibility":true}],["set","w80",{"tabIndex":26}],["set","w50",{"tabIndex":327}],["set","w60",{"tabIndex":328}],["set","w95",{"tabIndex":333}],["set","w96",{"tabIndex":334}],["set","w97",{"tabIndex":335}],["set","w98",{"tabIndex":336}],["set","w99",{"tabIndex":337}],["set","w100",{"tabIndex":338}],["set","w101",{"tabIndex":339}],["set","w109",{"tabIndex":343}],["set","w111",{"tabIndex":643}],["set","w113",{"tabIndex":943}],["set","w115",{"tabIndex":1243}],["set","w119",{"tabIndex":1245}],["set","w125",{"tabIndex":1246}],["set","w27",{"selection":"w39"}],["set","w28",{"bounds":[89,1,1752,27],"clientArea":[0,0,1752,27]}],["set","w1",{"focusControl":"w2"}]]}
[Updated on: Thu, 05 June 2014 09:34] by Moderator
|
|
| | | | |
Goto Forum:
Current Time: Wed Jul 23 22:05:04 EDT 2025
Powered by FUDForum. Page generated in 0.06143 seconds
|