mikemaccana / outdated-browser-rework

Detects outdated browsers and advises users to upgrade to a new version. Handles mobile devices!
MIT License
224 stars 62 forks source link

IE 11 - i.style.opacity error - i is undefined with "Impossible d’obtenir la propriété « style » d’une référence null ou non définie" #94

Open Vadorequest opened 4 years ago

Vadorequest commented 4 years ago

image

Just tried this package and it fails with this error.

Vadorequest commented 4 years ago

Doc isn't easily understandable and I missed the part where adding the <div id="outdated"></div> to the DOM, which led to this.

mikemaccana commented 4 years ago

I missed the part where adding the ... to the DOM

Is there a word missing here? Should the doc be improved?

Vadorequest commented 4 years ago

Yeah sorry, HTML got ignored by github, I edited.

Basically, I missed that I had to add <div id="outdated"></div> in the DOM, and that led to that cryptic error that made me think the package didn't work properly.

I'd suggest make it more obvious in the doc that adding the ID is always necessary, and avoid this error by checking if this id exists in the DOM.

mikemaccana commented 4 years ago

Those are good changes. Can you send a PR?

On Fri, 7 Feb 2020, 14:44 Vadorequest, notifications@github.com wrote:

Yeah sorry, HTML got ignored by github, I edited.

Basically, I missed that I had to add

in the DOM, and that led to that cryptic error that made me think the package didn't work properly.

I'd suggest make it more obvious in the doc that adding the ID is always necessary, and avoid this error by checking if this id exists in the DOM.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mikemaccana/outdated-browser-rework/issues/94?email_source=notifications&email_token=AABKEMQFKU3HA2URZEZ74JLRBVXV5A5CNFSM4KQNKVWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELDENHY#issuecomment-583419551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKEMTPWTQPR3JXWVROCZTRBVXV5ANCNFSM4KQNKVWA .