ion icons not showing up on ipad / edge
up vote
0
down vote
favorite
I have a stenciljs component deployed in an nginx server behind an authentication service. In order to get anything the request must include a cookie containing an access_token. the component is dipslyaed with no preoblem on android devices and on chrome/firfox/IE11/ in desktop devices. the problem is with microsoft edge and on ipad (any navigator) and its due to the browser not sending the cookie to the server. Any hint ?
header.tsx
import { Component, Prop, State, Element } from '@stencil/core';
@Component({
tag: 'pm-header',
styleUrl: 'pm-header.scss',
shadow: true
})
export class PmHeader {
...
render() {
return (
<nav>
<ul>
<li id="menu-icon" class="left menu-icon"
onClick={() => this.toggleFocus('menu-icon')} >
<a>
<ion-icon name="md-apps"></ion-icon>
</a>
</li>
<li id="user-icon" class="right menu-icon"
onClick={() => this.toggleFocus('user-icon')} >
<a>
<ion-icon name="md-contact"></ion-icon>
</a>
</li>
</ul>
</nav>
);
}
}
PS: I'm using stencil/core v0.15.2
ipad microsoft-edge stenciljs ionicons
add a comment |
up vote
0
down vote
favorite
I have a stenciljs component deployed in an nginx server behind an authentication service. In order to get anything the request must include a cookie containing an access_token. the component is dipslyaed with no preoblem on android devices and on chrome/firfox/IE11/ in desktop devices. the problem is with microsoft edge and on ipad (any navigator) and its due to the browser not sending the cookie to the server. Any hint ?
header.tsx
import { Component, Prop, State, Element } from '@stencil/core';
@Component({
tag: 'pm-header',
styleUrl: 'pm-header.scss',
shadow: true
})
export class PmHeader {
...
render() {
return (
<nav>
<ul>
<li id="menu-icon" class="left menu-icon"
onClick={() => this.toggleFocus('menu-icon')} >
<a>
<ion-icon name="md-apps"></ion-icon>
</a>
</li>
<li id="user-icon" class="right menu-icon"
onClick={() => this.toggleFocus('user-icon')} >
<a>
<ion-icon name="md-contact"></ion-icon>
</a>
</li>
</ul>
</nav>
);
}
}
PS: I'm using stencil/core v0.15.2
ipad microsoft-edge stenciljs ionicons
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a stenciljs component deployed in an nginx server behind an authentication service. In order to get anything the request must include a cookie containing an access_token. the component is dipslyaed with no preoblem on android devices and on chrome/firfox/IE11/ in desktop devices. the problem is with microsoft edge and on ipad (any navigator) and its due to the browser not sending the cookie to the server. Any hint ?
header.tsx
import { Component, Prop, State, Element } from '@stencil/core';
@Component({
tag: 'pm-header',
styleUrl: 'pm-header.scss',
shadow: true
})
export class PmHeader {
...
render() {
return (
<nav>
<ul>
<li id="menu-icon" class="left menu-icon"
onClick={() => this.toggleFocus('menu-icon')} >
<a>
<ion-icon name="md-apps"></ion-icon>
</a>
</li>
<li id="user-icon" class="right menu-icon"
onClick={() => this.toggleFocus('user-icon')} >
<a>
<ion-icon name="md-contact"></ion-icon>
</a>
</li>
</ul>
</nav>
);
}
}
PS: I'm using stencil/core v0.15.2
ipad microsoft-edge stenciljs ionicons
I have a stenciljs component deployed in an nginx server behind an authentication service. In order to get anything the request must include a cookie containing an access_token. the component is dipslyaed with no preoblem on android devices and on chrome/firfox/IE11/ in desktop devices. the problem is with microsoft edge and on ipad (any navigator) and its due to the browser not sending the cookie to the server. Any hint ?
header.tsx
import { Component, Prop, State, Element } from '@stencil/core';
@Component({
tag: 'pm-header',
styleUrl: 'pm-header.scss',
shadow: true
})
export class PmHeader {
...
render() {
return (
<nav>
<ul>
<li id="menu-icon" class="left menu-icon"
onClick={() => this.toggleFocus('menu-icon')} >
<a>
<ion-icon name="md-apps"></ion-icon>
</a>
</li>
<li id="user-icon" class="right menu-icon"
onClick={() => this.toggleFocus('user-icon')} >
<a>
<ion-icon name="md-contact"></ion-icon>
</a>
</li>
</ul>
</nav>
);
}
}
PS: I'm using stencil/core v0.15.2
ipad microsoft-edge stenciljs ionicons
ipad microsoft-edge stenciljs ionicons
edited Nov 23 at 7:51
asked Nov 22 at 15:45
malek yahyaoui
377
377
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26
add a comment |
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
So after some digging it turned out that the issue is with ionicons implementation.
They fetch the svgs without sending the credentials which result in an authenticated request. Of course some navigator such as chrome and firefox and even IE11 manages to send the cookies even though it's not explicitly specified that they should.
Anyway, to solve this I had to create a script file that run after the build. This script adds credentials: "include" option to the fetch call so that the cookie get sent.
fix-icons-script.js
/**
* Workaround to fix this ion-icons bug https://github.com/ionic-team/ionicons/issues/640
* To be removed when this bug is fixed
*/
const fs = require('fs');
const workDir = 'dist/component-dir';
fs.readdir(workDir, function(err, items) {
if (err) { return console.log(err); }
for (var i=0; i<items.length; i++) {
if (items[i].endsWith('.entry.js')) {
insertString(workDir + '/' + items[i], '"force-cache"', ',credentials:"include"');
}
}
});
function insertString(file, searchValue, insertValue){
fs.readFile(file, 'utf8', function (err, content) {
if (err) { return console.log(err); }
let newContent = content.substr(0, content.indexOf(searchValue) + searchValue.length);
content = content.substr(newContent.length, content.length);
newContent += insertValue + content;
fs.writeFile(file, newContent, function (err) {
if (err) { return console.log(err); }
console.log('Successfully rewrote ' + file);
});
});
}
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
So after some digging it turned out that the issue is with ionicons implementation.
They fetch the svgs without sending the credentials which result in an authenticated request. Of course some navigator such as chrome and firefox and even IE11 manages to send the cookies even though it's not explicitly specified that they should.
Anyway, to solve this I had to create a script file that run after the build. This script adds credentials: "include" option to the fetch call so that the cookie get sent.
fix-icons-script.js
/**
* Workaround to fix this ion-icons bug https://github.com/ionic-team/ionicons/issues/640
* To be removed when this bug is fixed
*/
const fs = require('fs');
const workDir = 'dist/component-dir';
fs.readdir(workDir, function(err, items) {
if (err) { return console.log(err); }
for (var i=0; i<items.length; i++) {
if (items[i].endsWith('.entry.js')) {
insertString(workDir + '/' + items[i], '"force-cache"', ',credentials:"include"');
}
}
});
function insertString(file, searchValue, insertValue){
fs.readFile(file, 'utf8', function (err, content) {
if (err) { return console.log(err); }
let newContent = content.substr(0, content.indexOf(searchValue) + searchValue.length);
content = content.substr(newContent.length, content.length);
newContent += insertValue + content;
fs.writeFile(file, newContent, function (err) {
if (err) { return console.log(err); }
console.log('Successfully rewrote ' + file);
});
});
}
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
add a comment |
up vote
0
down vote
accepted
So after some digging it turned out that the issue is with ionicons implementation.
They fetch the svgs without sending the credentials which result in an authenticated request. Of course some navigator such as chrome and firefox and even IE11 manages to send the cookies even though it's not explicitly specified that they should.
Anyway, to solve this I had to create a script file that run after the build. This script adds credentials: "include" option to the fetch call so that the cookie get sent.
fix-icons-script.js
/**
* Workaround to fix this ion-icons bug https://github.com/ionic-team/ionicons/issues/640
* To be removed when this bug is fixed
*/
const fs = require('fs');
const workDir = 'dist/component-dir';
fs.readdir(workDir, function(err, items) {
if (err) { return console.log(err); }
for (var i=0; i<items.length; i++) {
if (items[i].endsWith('.entry.js')) {
insertString(workDir + '/' + items[i], '"force-cache"', ',credentials:"include"');
}
}
});
function insertString(file, searchValue, insertValue){
fs.readFile(file, 'utf8', function (err, content) {
if (err) { return console.log(err); }
let newContent = content.substr(0, content.indexOf(searchValue) + searchValue.length);
content = content.substr(newContent.length, content.length);
newContent += insertValue + content;
fs.writeFile(file, newContent, function (err) {
if (err) { return console.log(err); }
console.log('Successfully rewrote ' + file);
});
});
}
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
So after some digging it turned out that the issue is with ionicons implementation.
They fetch the svgs without sending the credentials which result in an authenticated request. Of course some navigator such as chrome and firefox and even IE11 manages to send the cookies even though it's not explicitly specified that they should.
Anyway, to solve this I had to create a script file that run after the build. This script adds credentials: "include" option to the fetch call so that the cookie get sent.
fix-icons-script.js
/**
* Workaround to fix this ion-icons bug https://github.com/ionic-team/ionicons/issues/640
* To be removed when this bug is fixed
*/
const fs = require('fs');
const workDir = 'dist/component-dir';
fs.readdir(workDir, function(err, items) {
if (err) { return console.log(err); }
for (var i=0; i<items.length; i++) {
if (items[i].endsWith('.entry.js')) {
insertString(workDir + '/' + items[i], '"force-cache"', ',credentials:"include"');
}
}
});
function insertString(file, searchValue, insertValue){
fs.readFile(file, 'utf8', function (err, content) {
if (err) { return console.log(err); }
let newContent = content.substr(0, content.indexOf(searchValue) + searchValue.length);
content = content.substr(newContent.length, content.length);
newContent += insertValue + content;
fs.writeFile(file, newContent, function (err) {
if (err) { return console.log(err); }
console.log('Successfully rewrote ' + file);
});
});
}
So after some digging it turned out that the issue is with ionicons implementation.
They fetch the svgs without sending the credentials which result in an authenticated request. Of course some navigator such as chrome and firefox and even IE11 manages to send the cookies even though it's not explicitly specified that they should.
Anyway, to solve this I had to create a script file that run after the build. This script adds credentials: "include" option to the fetch call so that the cookie get sent.
fix-icons-script.js
/**
* Workaround to fix this ion-icons bug https://github.com/ionic-team/ionicons/issues/640
* To be removed when this bug is fixed
*/
const fs = require('fs');
const workDir = 'dist/component-dir';
fs.readdir(workDir, function(err, items) {
if (err) { return console.log(err); }
for (var i=0; i<items.length; i++) {
if (items[i].endsWith('.entry.js')) {
insertString(workDir + '/' + items[i], '"force-cache"', ',credentials:"include"');
}
}
});
function insertString(file, searchValue, insertValue){
fs.readFile(file, 'utf8', function (err, content) {
if (err) { return console.log(err); }
let newContent = content.substr(0, content.indexOf(searchValue) + searchValue.length);
content = content.substr(newContent.length, content.length);
newContent += insertValue + content;
fs.writeFile(file, newContent, function (err) {
if (err) { return console.log(err); }
console.log('Successfully rewrote ' + file);
});
});
}
answered Nov 23 at 15:47
malek yahyaoui
377
377
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
add a comment |
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
@ malek, From your last post. i can see that you had found the solution for your issue and posted it as an answer. I suggest you to mark that answer as an accepted answer for this question may help other community members in future. thanks for your understanding.
– Deepak-MSFT
Nov 26 at 3:22
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Tried to do it when I posted the answer but it wasn't possible until 24h after the answer is posted, thanks for reminding me :)
– malek yahyaoui
Nov 26 at 8:26
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
Thanks for your kind efforts for marking the answer for this thread.
– Deepak-MSFT
Nov 26 at 9:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434393%2fion-icons-not-showing-up-on-ipad-edge%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@ malek, I suggest you to provide a code sample to produce the issue. We will try to produce the issue on our side and try to find any possible solution or a work around. Thanks for your understanding.
– Deepak-MSFT
Nov 23 at 5:47
I posted some code sample, if there is any additional information that I can provide, please tell me :)
– malek yahyaoui
Nov 23 at 9:26