Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace unique classes by custom attributes, or use this in events #45

Open
danielschenk opened this issue Jul 29, 2023 · 0 comments
Open

Comments

@danielschenk
Copy link
Owner

danielschenk commented Jul 29, 2023

In the template, unique classes are defined (like: class="act-{{ key }}") which are used by the JavaScript to select all inputs which belong to a certain act. This is obviously not an intended use case of classes.

These should all be replaced by HTML5 custom data attributes, like:

<input data-act="{{ key }}" ...

This is already partly done for the free field inputs.

Alternatively, look into passing this in event handlers which could in some cases be sufficient to find the object needed (eg. as parent or sibling of).

@danielschenk danielschenk changed the title Replace unique classes with custom attributes Replace unique classes by custom attributes Jul 29, 2023
@danielschenk danielschenk changed the title Replace unique classes by custom attributes Replace unique classes by custom attributes, or use this in events Mar 11, 2024
@danielschenk danielschenk changed the title Replace unique classes by custom attributes, or use this in events Replace unique classes by custom attributes, or use this in events Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant