|
Re: Cannot find the source of Javascript error [message #1857721 is a reply to message #1857694] |
Wed, 22 February 2023 19:37 |
|
If you only use the model part of Scout (i.e. no custom widgets or overwritten framework code), this kind of error should not happen. In fact, this is exactly why you would use an abstract application framework in the first place. ;-)
Analyzing the stack trace (from bottom to top):
- The UI in the browser received a "requestFocusInCell" event for a table.
- It passed the event to the table widget, which used focusCell() to process the event.
- Somehow, this caused a CellEditorPopup to run its completeEdit() method.
- The cell editor popup apparently contained a SmartField, which tried to "accept" the current input.
- While reading the field value from the DOM, the exception ocurred. The DOM reference in the $field variable apparently was null.
Usually, JavaScript exceptions can easily be analyzed using the browser's developer tools (F12). Unfortunately, I don't think that this would be very helpful in this case, as there is lof of asynchronous stuff going on. The SmartField widgets was probably already destroyed when the focus event was processed.
There are three possible scenarios:
- It is a bug in Scout and you are the first person to have found it.
- It is a bug in Scout and it's already known and hopefully fixed in a newer version.
- Something in your custom application code has caused the issue. Check if you have added JavaScript code (e.g. a custom widget) that could interfere with Scout. On the Server side, such problems can occur when the Scout model is changed outside of the ModelThread.
What Scout version are you using? What did you do to cause this error? Can you reproduce it? If yes, try to reduce the problem, i.e. remove code one by one until you find out exactly which combination is causing the error.
Regards,
Beat
|
|
|
Powered by
FUDForum. Page generated in 0.02977 seconds