Closed yeojihun closed 2 years ago
안녕하세요~ 해당 에러는 재현이되지 않는데, 포커스 이동시에 다른 에러가 발생하는건 아닌가요?
I see this issue in Chrome (but not Firefox) when I have multiple editors on the page.
Steps to reproduce,
Expected Outcome
Actual outcome
Notes
I have exactly the same behavior in Chrome. And this error is only visible if the editor has no content.
@andylwelch @abvas Still can't reproduce this issue. :( Can you show me exactly how you created the two editors?
@JiHong88
There's nothing special. Reproduce the source shown in the example URL below by inserting it locally and executing it.
The reason why you can't check the same phenomenon seems to be because of the difference in versions of different modules.
I temporarily solved the "suneditor-react" version by lowering it to 2.12.
Below is my current package file.
[example] https://codesandbox.io/s/9wgxi?file=/src/App.js
[my package] "devDependencies": { "@babel/cli": "^7.10.1", "@babel/core": "^7.16.12", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-syntax-class-properties": "^7.10.1", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-flow": "^7.10.1", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.10.1", "axios": "^0.19.2", "babel-loader": "^8.2.3", "browser-sync": "^2.26.7", "browser-sync-webpack-plugin": "^2.2.2", "classnames": "^2.2.6", "clean-webpack-plugin": "^3.0.0", "css-loader": "^3.5.3", "eslint": "^7.14.0", "eslint-config-prettier": "^6.15.0", "eslint-plugin-prettier": "^3.1.4", "file-loader": "^6.0.0", "html-webpack-plugin": "^4.3.0", "jquery": "^3.5.1", "jquery-ui": "^1.12.1", "jquery-ui-bundle": "^1.12.1-migrate", "jquery-ui-dist": "^1.12.1", "jqueryui": "^1.11.1", "json-bigint": "^1.0.0", "lodash": "^4.17.21", "moment": "^2.29.1", "moment-timezone": "^0.5.32", "node-sass": "^4.14.1", "prettier": "2.2.1", "qrcode.react": "^1.0.0", "query-string": "^6.13.8", "react": "^16.13.1", "react-dom": "^16.13.1", "react-filter-search": "^1.0.11", "react-highlighter": "^0.4.3", "react-hot-loader": "^4.12.21", "react-icons": "^3.10.0", "react-iframe": "^1.8.0", "react-moment": "^1.0.0", "react-number-format": "^4.4.1", "react-redux": "^7.2.0", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-scripts": "^3.4.1", "react-tabs": "^3.1.1", "react-toastify": "^6.0.5", "redux": "^4.0.5", "redux-devtools": "^3.5.0", "redux-devtools-extension": "^2.13.8", "redux-logger": "^3.0.6", "redux-thunk": "^2.3.0", "sass-loader": "^8.0.2", "style-loader": "^1.2.1", "styled-components": "^5.1.1", "uglifyjs-webpack-plugin": "^2.2.0", "url-loader": "^4.1.0", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-jquery-ui": "^2.0.1" }, "dependencies": { "@babel/runtime": "^7.16.7", "@g-loot/react-tournament-brackets": "^1.0.16", "babel-preset-es2015": "^6.24.1", "deepmerge": "^4.2.2", "multer": "^1.4.2", "react-datepicker": "^4.6.0", "react-ga": "^3.3.0", "react-js-pagination": "^3.0.3", "react-loading-skeleton": "^2.2.0", "react-power-tooltip": "^1.0.2", "react-string-replace": "^0.4.4", "react-svg-pan-zoom": "^3.11.0", "react-svg-pan-zoom-loader": "^1.4.1", "react-tooltip": "^4.2.21", "react-tooltip-lite": "^1.12.0", "react-virtualized": "^9.22.3", "suneditor-react": "^2.12.2", "swiper": "^6.7.0" }
Thanks for the reply. The issue has been opened in suneditor-react too https://github.com/mkhstar/suneditor-react/issues/262
Hi @JiHong88 this issue is reproducible with the core suneditor package. Demo here https://codepen.io/mkhstar/pen/YzVxbrL
Declare n editors within the same component and shift the focus to the editor first.
If you click another editor without entering a value, the focus will not move.