angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

$cookieStore.put() fails in safari ios & android

Open martymartino opened this issue 14 years ago • 8 comments

$cookieStore.put() has stopped working in ios and android in all releases after rc5

martymartino avatar Jun 22 '12 21:06 martymartino

Also fails on IE. I traced the failure to "cookiePath" being undefined. The Cookies API calls the function "baseHref" which has this line that seems to be incorrect:

    var href = baseElement.attr('href');

Setting href to be the page URL fixes the cookies issue on IE and Safari. The undefined didn't seem to bother Chrome and FF.

RichJohnson2 avatar Jul 24 '12 06:07 RichJohnson2

Do you have the exact fix you implemented? I've been having this issue since 9.19 and been patching with pure JS cookie saves this whole time.

C0deS1ayer avatar Jul 24 '12 13:07 C0deS1ayer

I have fallen back to using jstorage and it works great (if you need a temp work-around). http://www.jstorage.info/

patrickjamesbarry avatar Aug 01 '12 16:08 patrickjamesbarry

+1 Please fix it, it's serious issue. (in IE)

dankrz avatar Aug 28 '12 10:08 dankrz

please provide a plunker/jsfiddle use case.

mhevery avatar Aug 31 '12 18:08 mhevery

A fix/workaround:

https://github.com/angular/angular.js/issues/1191#issuecomment-10491300

nilnullzip avatar Nov 18 '12 22:11 nilnullzip

Here is a jsfiddle: http://jsfiddle.net/sansnom/6ALNN/

sansnom avatar Jan 03 '13 15:01 sansnom

fixed by 7090924515214752b919b0c5630b3ea5e7c77223

IgorMinar avatar Feb 07 '13 10:02 IgorMinar