-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Enhancement: mat-icon set current page absolute path on filter urls for compatibility with safari #9276
Comments
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). see https://github.com/jeffbcross/angular-svg-base |
New findings, the workaround I provided above doesn't seem to work on subroutes. For example when navigating to With this new addition, this makes svg filters unusable in safari |
Also |
SVG filters do not work in Safari/FF because of paths in url needing to be updated to current path This fixes angular#9276
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes angular#9276.
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes #9276.
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes #9276.
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes angular#9276.
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes angular#9276.
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes #9276.
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. |
#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. |
Prepends the current path to any SVG elements with attributes pointing to something by id. If the reference isn't prefixed, it won't work on Safari if the page has a `base` tag (which is used by most Angular apps that are using the router). Fixes angular#9276.
This issue has been automatically locked due to inactivity. 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
The text was updated successfully, but these errors were encountered: