简体   繁体   English

对象不支持属性或方法将 IE11 中的 react-responsive-modal 与 react js 匹配

[英]object does not support property or method matches react-responsive-modal in IE11 with react js

I want to open my modal popup with 'react js' in IE browser, I can understand after study some blog for IE, I have to add 'react-app-polyfill' along with import statement in a very first file that is in my index.js.我想在 IE 浏览器中使用“react js”打开我的模态弹出窗口,在学习了一些 IE 博客后我可以理解,我必须在我的第一个文件中添加“react-app-polyfill”和导入语句索引.js。 for this I am following the below github url.为此,我正在关注以下 github 网址。 https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md

but what is happening, my react js app is working fine in IE browser.但是发生了什么,我的 react js 应用程序在 IE 浏览器中运行良好。 but I am facing problem in my modal opening part.但我在我的模式打开部分遇到了问题。 for modal I am using react-responsive-modal( https://www.npmjs.com/package/react-responsive-modal ), it is working as expected in Chrome browser but not in IE.对于模态,我使用的是 react-responsive-modal( https://www.npmjs.com/package/react-responsive-modal ),它在 Chrome 浏览器中按预期工作,但在 IE 中却没有。

I am getting error when I am opening modal in IE browser.在 IE 浏览器中打开模态时出现错误。 I am attaching my error screen shot.我附上了我的错误屏幕截图。 在此处输入图片说明

Please help if anyone can help to resolve this issue.如果有人可以帮助解决此问题,请提供帮助。

I try to test the issue in the IE 11 and also try to check the error messages from the picture you had posted in the original post.我尝试在 IE 11 中测试该问题,并尝试检查您在原始帖子中发布的图片中的错误消息。

From the error message, it looks like the error comes from the react-responsive-modal library files.从错误消息来看,错误似乎来自 react-responsive-modal 库文件。

It looks like the repeat method is not supported in the IE browser.看来IE浏览器不支持repeat方法。

So it is creating compatibility issues with the IE browser.因此,它正在与 IE 浏览器产生兼容性问题。

I suggest you try to use the library that is compatible with the IE browser or if that is not possible then you can try to identify the IE browser using JS code and inform the user to use the compatible browser with your app.我建议您尝试使用与 IE 浏览器兼容的库,否则您可以尝试使用 JS 代码识别 IE 浏览器并通知用户使用与您的应用程序兼容的浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 对象在 React 的 IE11 中不支持属性或方法“scrollBy” - Object doesn't support property or method 'scrollBy' in IE11 in React IE11:对象不支持属性或方法“ replaceWith” - IE11: Object doesn't support property or method 'replaceWith' 对象不支持属性或方法“ readAsBinaryString”-IE11 - Object doesn’t support property or method ‘readAsBinaryString’ - IE11 对象不支持IE11中的属性或方法'getElementsById' - Object doesn't support property or method 'getElementsById' in IE11 IE11 对象不支持属性或方法“规范化” - IE11 Object doesn't support property or method 'normalize' IE11 - 对象不支持属性或方法“包含” - IE11 - Object doesn't support property or method 'contains' Object 不支持 IE11 中的属性或方法“forEach” - Object doesn't support property or method 'forEach' in IE11 对象在platform.js和IE11中不支持属性或方法'getAttribute'错误 - Object doesn't support property or method 'getAttribute' error in platform.js and IE11 如何设置react-responsive-modal的模态宽度? - how to set the width of modal of react-responsive-modal? 使用 service-worker.js 中的方法在 EDGE 和 IE11 对象中获取错误不支持属性或方法“waitUntil” - getting error in EDGE and IE11 Object doesn't support property or method 'waitUntil'" using method in service-worker.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM