soflyy/oxygen-bugs-and-features

ELEMENT_ID of repeater returns DATA-ID

Opened this issue · 0 comments

Describe the bug
When using a repeater with custom JS code inside an element, using the "%%ELEMENT_ID%%" tag returns the 'data-id' of the element. The repeater normally increments a '-x' numeration to the elementid when using a repeater, shouldn't the "%%ELEMENT_ID%%" tag return the elementid generated in the repeater instead of the 'data-id' ?

A link to a Sandbox site where the bug has been reproduced:
https://oxygen-qt3fp7h9jnjzl.oxygen-demo.qsandbox.org/sample-page/

Steps to reproduce the behavior:

  1. Add a repeater element;
  2. Add custom JS to an element inside the repeater;
  3. Use the "%%ELEMENT_ID%%" tag;
  4. Run the page in the front-end and inspect;
  5. Check console (if logged) or check Sources where you will see the data-id tag being passed instead of the actual ID '-1' or '-2';