yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 929 forks source link

Not working with Internet explorer #353

Open ipa1981 opened 8 years ago

ipa1981 commented 8 years ago

https://yuche.github.io/vue-strap/ page doesn't open with neither IE version.

Console errors:

SCRIPT5022: Exception thrown and not caught
build-docs.js (732,14)

image

I also figured our that carousel component also throws critical errors on all Internet Explorer versions. Maybe these two problems are related.

StevenBock commented 8 years ago

I've just run into this with the modal component as well.

xori commented 8 years ago

The Navbar component also throws errors

wffranco commented 8 years ago

vue by default says that support IE 9+, so if you are using an older version this don't work. Anyway I don't test it because i have IE 8 and vue don't work there :v

ipa1981 commented 8 years ago

@wffranco it doesn't work on any IE. Nobody talks here about IE8 :)

wffranco commented 8 years ago

@ipa1981 i just said the vue limitations and that I don't have any "suported" IE for testing, just in case you used some old version. I'm downloading IE9, then I can test, right now I can't say what happen :stuck_out_tongue:

ipa1981 commented 8 years ago

@wffranco any luck with downloading? Can you reproduce these errors?

xori commented 8 years ago

Just a note that it seems to be your NodeList implementation. And it throws an exception when this = [ window ].

Changing the above linked line to a traditional for loop (patch)

for (var i = 0; i < this.length; i++) {
  var el = this[i];

somehow fixes the problem enough to at least paint the first screen. However other issues then surface.

wffranco commented 8 years ago

@ipa1981 sorry but microsoft disabled the download of older IE, in win7 I can download only IE11, and I don't download that kind of things from other sources, can have some virus. @xori vuestrap use webpack, this translate all the newer javascript features (ES6) to a older version (ES5), maybe the problem is that the version of IE you're using don't have a full support of ES5 too. They say that work with IE9+, but maybe is not all truth... but work in the last version and in edge.

ipa1981 commented 8 years ago

@wffranco problem is not only in older IE. You may try it in IE11. In my case I got error in IE11. but just reported, that the problem exists in older versions as well.

xori commented 8 years ago

I was using windows 8.1 IE 11. And I realize that you're using babel however to my knowledge to use this type of for loop across all browsers requires 'babel-core/polyfill' 'babel-polyfill' which (i assume?) you're not using.

xori commented 8 years ago

Yup. Just confirmed doing

npm install --save-dev babel-polyfill

and changing my webpack config entry to

entry: [
    'babel-polyfill',
    path.resolve('js', 'app', 'my.app.js'),
  ],

makes my application and the vue-strap docs website work in IE 11.

xori commented 8 years ago

I mean, the vue-strap docs are still borked in IE11 (navbar dropdown not working) but it's at least showing up.

wffranco commented 8 years ago

ok I check this later.

rick-hidef commented 8 years ago

I am experiencing the same issue in IE11. Adding babel-polyfill to my package.json, and changing my webpack configuration from

entry: {
    app: './src/main.js'
  },

to

entry: {
    'babel-polyfill': 'babel-polyfill',
    app: './src/main.js'
  },

appears to have fixed the problem for me.

tylertyssedal commented 8 years ago

Is there an update to this? It seems like @xori and @rick-hidef solved this problem, yet I don't see it committed.

Not working at all in Internet Explorer 11 renders Vue-Strap useless in real world implementations. I would highly recommend resolving this issue ASAP.

Confirmed that running npm install --save-dev babel-polyfill and replacing the config.entry in webpack.build.js to the following fixes it:

config.entry = {
  'vue-strap': [
    'babel-polyfill',
    './src/index.js',
  ]
}
tylertyssedal commented 8 years ago

Created pull request: https://github.com/yuche/vue-strap/pull/384

bruceCzK commented 8 years ago

I'm facing the same issue in android wechat brwoser, but it doesn't throw an error, instead it cause all href link broken which is wired. And yes, add babel-polyfill did solve the problem

ipa1981 commented 8 years ago

Dear @wffranco could you please check or accept PR by community :). I agree with @metamet that it's quite urgent problem to be solved for real world applications.

xori commented 8 years ago

by accepting the pull request the output will increase in size by roughly 85kb. A task should probably follow to then remove this dependency in the future by converting all incompatible code. The good news is that most of the bad code is in the docs, not actually in the components.

ipa1981 commented 8 years ago

@xori I agree plus 85kb is not the best solution. But it's good as quickfix to make lib finally work in IE ASAP.

wffranco commented 7 years ago

Instead of adding the pollyfill to the main vue-strap compilation I think you can add it apart, until somebody fix the problem. Maybe explain that in the docs too... But like @xori said I think that add 85kb to the source is not the best solution. If I can I'll check that things, but when I have a little more time, right now I'm very busy.

ipa1981 commented 7 years ago

@wffranco I've added a polyfill locally. thanks Would do some fixes at least in some places, if someone accepts PR here)

wffranco commented 7 years ago

I can accept the PR. Just try to use a clean syntax.

ipa1981 commented 7 years ago

@wffranco can you check if I did PR correctly? This is my first time.

wffranco commented 7 years ago

done. and fixed other errors. sorry for the time, i'm a little bussy. can you make the build? right now I have vue2 in my work space

ipa1981 commented 7 years ago

@wffranco it seems something is broken after you did other changes :)

Now even chromium based browsers throw error: Uncaught TypeError: Cannot read property 'forEach' of undefined(…) utils.js:17

Have never made builds, should I simply do npm run build of working version and PR it?

pomarc commented 7 years ago

the datepicker breaks it for me.

wffranco commented 7 years ago

Well I finally fix all, all tested in Edge and all fine. I don't have any version of internet explorer, so please test it and tell me if you find some bug or is working right.

pomarc commented 7 years ago

https://yuche.github.io/vue-strap/ now works on IE11,. this bug https://github.com/yuche/vue-strap/pull/303 persists.

ipa1981 commented 7 years ago

It works well now. It still doesn't work with IE9.

wffranco commented 7 years ago

@pomarc I don't have time to check the datepicker in deep, but I think that is a global error, not only on IE.

muermaru commented 7 years ago

in ie9, the datepicker looks all right,then when I select a day but noting happend... image image and this is ie's err log. at the same time,the Select's clear button can't use,like my click penetrate it