angular-count-to icon indicating copy to clipboard operation
angular-count-to copied to clipboard

Issue with firefox

Open shafeeksm opened this issue 11 years ago • 5 comments

There is some issue with this directive on Firefox browser, I have tested the directive in Firfox version 31.0 and its not working, and it doesn't even showing any error messages in console.

I think its the issue with "e.innerText" wchich doesn't support in Firfox. Either that should be replaced with innerHTML (supports in all browsers) or with textContent (which won't work in IE8).

shafeeksm avatar Sep 11 '14 06:09 shafeeksm

indeed, simply replacing innerText with innerHTML solved the issue for me

Freundschaft avatar Feb 09 '15 13:02 Freundschaft

I have the same problem... Solution of Freundschaft doesn't work for me... Firefox 38.0.5

rafalradomski avatar Jun 24 '15 22:06 rafalradomski

I fixed it by replacing innerText with textContent

rafalradomski avatar Jun 24 '15 22:06 rafalradomski

innerText is no longer supported by firefox as of 2015-03-13. Firefox uses the W3C-compliant textContent property. http://stackoverflow.com/questions/1359469/innertext-works-in-ie-but-not-in-firefox

Frondor avatar Jul 08 '15 15:07 Frondor

So it appears that the unminified file in the src/count-to.js is using .textContent() but the minified file in build/angular-count-to.min.js uses .innerText() which causes the Firefox breakage.

I was able to use the plugin w/o forking by adding this to my bower.json file to just use the src/count-to.js instead of referencing the minified version.

"overrides": { "angular-count-to": { "main": "src/count-to.js" }, }

I end up minifying the code down the line anyhow.

kylebradshaw avatar Aug 27 '15 13:08 kylebradshaw