Closed MikaAK closed 5 years ago
Possible duplicate of #4263
Not quite @jelbourn that issue seems to be around allowing urls passed to the register to be relative. This is more around either changing the actual url's of the svg's filters/masks when referencing defs (since it must change on a per page basis this would need to be done at render).
New findings, the workaround I provided above doesn't seem to work on subroutes. For example when navigating to http://localhost:3000/pain-module/quieting-the-pain-alarm
it tries to request packages from http://localhost:3000/pain-module/
With this new addition, this makes svg filters unusable in safari
Also clip-path="url(#a)"
doesn't work in safari. Painful.
We tried upgrading to Material 7, and this broke icons on our header in Chrome. As they are in our header, they get rendered on the first page which is opened, and the url is set to that path. Once we navigate from there, they aren't re-rendered, so the url is now wrong, and they vanish.
That is a probably issue with doing this and having icons persistant across pages. The icons would need a url update
It turns out, all of our icons are broken, not just the ones which are persistent across pages, as the _location is cached by the location factory. However, a fix should also also consider supporting icons which are persistent across pages.
https://github.com/angular/material2/pull/13641 should sort the issue out. My understanding is that the URLs don't have to be updated once they're in place, but the problem is that the provider caches the path the first time it's resolved.
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.
Feature request:
mat-icon is super useful for using svg's inline in the browser. However what's the solution when you need to filter. Since
<base href='/'>
is in use for history you must append svg filters with the current url. Example:This works because url is set to absolute path. Anything else and the svg works in chrome but not in safari! This used to be an issue in chrome a few years ago but it seems chrome got smarter, however safari has not 😢
What are the steps to reproduce?
I tried to reproduce on plunker but since there's no baseUrl being set and it doesn't seem possible to set I cannot reproduce.
What is the use-case or motivation for changing an existing behavior?
Safari Compatibility
Other Info
As a workaround you can skip setting baseUrl in the index document and set it with