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

Svg elements can't be dragged in IE11 #14214

Closed
evanfuture opened this issue Nov 20, 2018 · 1 comment · Fixed by #14215
Closed

Svg elements can't be dragged in IE11 #14214

evanfuture opened this issue Nov 20, 2018 · 1 comment · Fixed by #14215

Comments

@evanfuture
Copy link
Contributor

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Svg elements (g, circle, line, etc) should be able to have the cdkDrag directive applied to them.

What is the current behavior?

In IE11, they can't be dragged.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-jguheq
Try out the above StackBlitz in IE11 (might be faster to skip loading the editor: https://angular-material2-issue-jguheq.stackblitz.io/ )

Note that the circle can not be dragged (but also note that there aren't any errors)

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 7, Material's new drag and drop module.

Is there anything else we should know?

I will have a PR for this prepared soon (once I write some tests). The issue is that IE11 does not acknowledge the transform css property when it changes. It does, however work if you set the transform html property using setAttribute. (caveat though, IE11 reads the style.transform value as a matrix3d() string, but refuses to see setAttribute changes unless they are matrix() strings. My fix handles this.

evanfuture pushed a commit to evanfuture/material2 that referenced this issue Nov 20, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well.
- IE11 does not acknowledge the style.transform property, but does allow the attribute
- IE11's getComputedStyle returns a matrix3d(), but doesn't allow that to be passed via setAttribute

Closes angular#14214
evanfuture pushed a commit to evanfuture/material2 that referenced this issue Nov 21, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well.
- IE11 does not acknowledge the style.transform property, but does allow the attribute.

Closes angular#14214
evanfuture pushed a commit to evanfuture/material2 that referenced this issue Nov 21, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well.

- IE11 does not acknowledge the style.transform property, but does allow the attribute.

Closes angular#14214
evanfuture pushed a commit to evanfuture/material2 that referenced this issue Nov 21, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well.

- IE11 does not acknowledge the style.transform property, but does allow the attribute.

Closes angular#14214
jelbourn pushed a commit that referenced this issue Nov 27, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well. IE11 does not acknowledge the style.transform property, but does allow the `transform` attribute

Closes #14214
jelbourn pushed a commit that referenced this issue Dec 3, 2018
Added check for when _rootElement is an SVGElement and set the transform attribute as well. IE11 does not acknowledge the style.transform property, but does allow the `transform` attribute

Closes #14214
josephperrott pushed a commit to josephperrott/components that referenced this issue Jan 14, 2019
…r#14215)

Added check for when _rootElement is an SVGElement and set the transform attribute as well. IE11 does not acknowledge the style.transform property, but does allow the `transform` attribute

Closes angular#14214
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants