Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there are n or more editor declarations, the focus movement does not work normally #951

Closed
yeojihun opened this issue Mar 7, 2022 · 9 comments
Labels
Milestone

Comments

@yeojihun
Copy link

yeojihun commented Mar 7, 2022

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.

@JiHong88
Copy link
Owner

JiHong88 commented Mar 7, 2022

안녕하세요~
해당 에러는 재현이되지 않는데, 포커스 이동시에 다른 에러가 발생하는건 아닌가요?

@andylwelch
Copy link
Contributor

I see this issue in Chrome (but not Firefox) when I have multiple editors on the page.

Steps to reproduce,

  1. click into an editor with no content
  2. click into a different editor

Expected Outcome

  • keyboard focus to be in the second editor

Actual outcome

  • keyboard focus is still in the first editor (the onFocus is even triggered again!)

Notes

  • works fine in Firefox and also if the first editor has content

@abvas
Copy link

abvas commented Mar 9, 2022

I have exactly the same behavior in Chrome.
And this error is only visible if the editor has no content.

@JiHong88
Copy link
Owner

@andylwelch @abvas Still can't reproduce this issue. :(
Can you show me exactly how you created the two editors?

@yeojihun
Copy link
Author

@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"
}

@JiHong88
Copy link
Owner

For issues with "suneditor-react", please open an issue here.

@andylwelch
Copy link
Contributor

Thanks for the reply. The issue has been opened in suneditor-react too
mkhstar/suneditor-react#262

@mkhstar
Copy link

mkhstar commented Mar 13, 2022

Hi @JiHong88 this issue is reproducible with the core suneditor package.
Demo here https://codepen.io/mkhstar/pen/YzVxbrL

@JiHong88 JiHong88 added bug and removed discussion labels Mar 14, 2022
@JiHong88 JiHong88 added this to the 2.43.0 milestone Mar 14, 2022
@JiHong88 JiHong88 closed this as completed Apr 7, 2022
@JiHong88
Copy link
Owner

The 2.43.0 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants