| Summary: | [Table][Tree] Client side error on touch event when no items exist | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Sebastian Habenicht <dev> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan, mknauer |
| Version: | 3.1 | ||
| Target Milestone: | 3.2 M3 | ||
| Hardware: | PC | ||
| OS: | Android | ||
| See Also: | https://git.eclipse.org/r/#/c/83190/ | ||
| Whiteboard: | sr312 | ||
Could you provide the complete error stack trace/details? Sure - this is what firebug-lite shows (using 3.1.0-RC1):
TypeError: Cannot read property 'getOffset' of undefined
at Object._getScrollYOffset (http://10.0.20.5:62721/rwt-resources/310/rap-client.js:61171:32)
at Object._initVirtualScroll (http://10.0.20.5:62721/rwt-resources/310/rap-client.js:61127:43)
at Object._handleTouchStart (http://10.0.20.5:62721/rwt-resources/310/rap-client.js:61029:12)
at Object._onTouchEvent (http://10.0.20.5:62721/rwt-resources/310/rap-client.js:60966:18)
at HTMLBodyElement.<anonymous> (http://10.0.20.5:62721/rwt-resources/310/rap-client.js:624:17)
I simply started the application with the example code above in the entry point and touched the table without doing anything else. Hope, this helps.
BTW: Adding a TableColumn does not make a difference (that's why I omitted it in the example code).
Please try RAP 3.1 final release. I believe it's fixed there. No, it's not. I actually came up against it using 3.1.1 and just tried the older builds to provide the information since when the error exists (that's why I wrote 'Reproduceable since 3.1.0-RC1...' - sorry, if that was misleading). So it is still in 3.1.0 and 3.1.1. The stack trace is the same for all these builds. Fixed with change https://git.eclipse.org/r/#/c/83190/ Thank you - it would be great to have this fix in the service release 3.1.2. Do you think this is possible? (In reply to Sebastian Habenicht from comment #6) > Thank you - it would be great to have this fix in the service release 3.1.2. > Do you think this is possible? Yes... It's a safe fix for backporting. |
When a table or tree with no items receives a touch event, a client side error occurs: "Cannot read property 'getOffset' of undefined" Reproduceable since 3.1.0-RC1 on android tablet and smartphone with chrome and the on-board-browser app: protected void createContents(final Composite parent) { final Table table = new Table(parent, SWT.BORDER); table.setLayoutData(new GridData(200, 100)); // new TableItem(table, SWT.NONE); // no error when item is created }