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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic fields elements for IE11 #5052

Merged
merged 4 commits into from Apr 5, 2019
Merged

Fix dynamic fields elements for IE11 #5052

merged 4 commits into from Apr 5, 2019

Conversation

@ahukkanen
Copy link
Contributor

@ahukkanen ahukkanen commented Apr 4, 2019

馃帺 What? Why?

This fixes the dynamic field elements for IE11 as explained in #5035.

This is an unfortunately complex fix for IE11 but it is the only way to make it compatible with that browser. The biggest issue with this is not actually the admin panel where we initially noticed issues with this but another component we built for the participation interface using the same component. Therefore, this component should consider both cases to support IE11 as well.

This should also maintain backwards compatibility in case someone is using the <template> tags with the dynamic fields component.

馃搶 Related Issues

馃搵 Subtasks

  • Add CHANGELOG entry
  • Fix tests
ahukkanen added 2 commits Apr 4, 2019
Because IE11 does not support the `<template>` tag very well,
add functionality to the dynamic fields component to match also
`<script type="text/template">` tags as an alternative.

The views need to use this type of templates in order for them to
work properly on IE11. Also, this types of templates cannot have
child templates meaning that the wrapper element needs to map the
child template with the `data-template` attribute.
With the updated dynamic fields component, it is now possible to
mark the dynamic fields markup with
`<script type="text/template">`. This makes them compatible with
IE11.

Also note that this types of templates cannot have any child
templates which is why the child templates have been moved outside
of the parent template and mapped with the `data-template`
attribute on the dynamic fields wrapper element.
Copy link
Contributor

@mrcasals mrcasals left a comment

Looks good to me!

@mrcasals mrcasals merged commit a524dd3 into decidim:master Apr 5, 2019
29 checks passed
@mrcasals
Copy link
Contributor

@mrcasals mrcasals commented Apr 5, 2019

Thanks for those PRs @ahukkanen! 馃槃

@ahukkanen ahukkanen deleted the fix/5035 branch Apr 5, 2019
@isaacmg410
Copy link
Contributor

@isaacmg410 isaacmg410 commented Jul 9, 2019

@ahukkanen This PR has added another problem.
We reported in metadecidim this morning https://meta.decidim.org/processes/bug-report/f/210/proposals/14698
Do you have time to fix it?

Thanks in advance 馃槃

@ahukkanen
Copy link
Contributor Author

@ahukkanen ahukkanen commented Jul 20, 2019

@isaacmg410 See #5275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants