- This topic has 4 replies, 3 voices, and was last updated 11 years, 8 months ago by support-michael.
-
AuthorPosts
-
cmstephanMemberHi,
the custom list works fine now with the update to 1.5 version.If I am using a simple action on the ListItem it works perfect:
– usingdata-action-click-id = "actionx"
within the list
– catching inside theprePageTransition
– using
$(event.srcElement).attr('data-listitem-index');
to get the index
BUT if I add an Icon in the listItem, add an Event to it and try to use it the same way the Action will be called twice
<img id="XXX" class="m1-clickable" src="res/images/001_status_stop.png" data-action-click-id="action5" data-listitem-index="' + i + '"/>';
Any idea how to adress that issue?
Thanks
ChristopherAttachments:
You must be logged in to view attached files.
support-michaelKeymasterI haven’t had time to sync w/ octavio re: you code example but there is one issue that we need to look into that seems to be caused by multiple calls to preprocessDOM(). It seems this could be causing redundant event handler registration. Give us some time to investigate this tomorrow.
cmstephanMemberHi,
I tested some more things and figuered out that there is some more strange behaviour.
I added an button on the screen with the list and even there the action gets triggered twice.
If you jump back and forth between the dialogs and press the button the action gets triggered even more times.It looks like that there is something wrong with the event handler.
It would be perfect if you could have a look and find a solution as soon as possible.Thanks
ChristopherAttachments:
You must be logged in to view attached files.
renato.guigliaParticipantHi, i have the same problem, do you found any solution?
support-michaelKeymaster@cmstephan
This issue is probably the result of calling preprocessDOM() on existing nodes. A key function of preprocessDOM() is to bind actions to widgets. If you call preprocessDOM on the same node repeatedly redundant bindings are created. Thus, 1 event my have duplicate actions bound to it. The immediate solution is to call preprocessDOM only on newly created nodes.If you have a different situation please post code snippet or better a small example project that demonstrates the issue.
Lastly: we are evaluating the preprocessDOM() approach and how to improve it.
-
AuthorPosts