Thursday, November 26, 2020
1 change · master
Resolved issues and error corrections
This fixes a mobile issue where tapping certain elements inside embedded lists could show an error instead of responding normally. Users working on phones or tablets should no longer see a traceback when interacting with those list fields.
Original PR description
When performing a "touch" on some elements (e.g. a list view inside a form view) on mobile, a traceback is displayed with the error "Cannot read property 'length' of undefined". In this context, the "undefined" is the property "this.selection" in the ListRender. It happens due to an unintentional override of the event handler methods used for the "touchstart" and "touchend" events in both BasicRenderer and ListRenderer, making the first one calling the second one event handler. Those were introduced respectively in 4ee338a and ab8932f . Steps to reproduce (on mobile): - Open Fleet app (but not specific to this app) - Car > Create - Scroll to "Fiscality: Disallowed Expenses Rates" field (which is a list) - Click on the "%" symbol => Traceback This commit fixes it by giving more specific names to the event handler's methods on both BasicRenderer and ListRenderer.