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

Mac OS - Emoji scramble #2244

Closed
D4nte opened this issue Dec 30, 2019 · 17 comments
Closed

Mac OS - Emoji scramble #2244

D4nte opened this issue Dec 30, 2019 · 17 comments
Labels
bug It's a bug stale An issue that hasn't been active for a while...

Comments

@D4nte
Copy link

D4nte commented Dec 30, 2019

Environment

Joplin version:

Joplin 1.0.176 (prod, darwin)
Client ID: d0cffdc90adb49d0a7e9fcd2d1f7fc79
Sync Version: 1

Revision: 64a1408 (HEAD)

Platform: macOS Mojave 10.14.6

Steps To Reproduce

  1. Create new note
  2. Enter "foo"
  3. Move cursor to the left of "foo": |foo
  4. Press control+command+space to enter emoji
  5. Select ✅ emoji: ✅foo

Expected: cursor works as usual.
Actual: The cursor has issues. | represents the cursor:

  • When moving the cursor to the right, at most it goes to here: ✅fo|o.
  • Then, when hitting backspace twice, the result is: ✅|f
    When deleting using backspace, it deletes the character on the right of the cursor.

Logfile

console:

/Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Connect(HeaderComponent), Connect(MainScreenComponent), Connect(NavigatorComponent), Connect(NoteListComponent), Connect(NoteTextComponent), Connect(RootComponent), Connect(SideBarComponent), Provider
printWarning @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357
/Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Connect(HeaderComponent), Connect(MainScreenComponent), Connect(NavigatorComponent), Connect(NoteListComponent), Connect(NoteTextComponent), Connect(RootComponent), Connect(SideBarComponent)
printWarning @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357
/Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Connect(NoteTextViewerComponent), Connect(ToolbarComponent), ReactAce
printWarning @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357
lowPriorityWarningWithoutStack @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12378
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12548
flushRenderPhaseStrictModeWarningsInDEV @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:25689
commitRootImpl @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24937
unstable_runWithPriority @ /Applications/Joplin.app/Contents/Resources/app/node_modules/scheduler/cjs/scheduler.development.js:697
runWithPriority$2 @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12149
commitRoot @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24922
finishSyncRender @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24329
performSyncWorkOnRoot @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24307
(anonymous) @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12199
unstable_runWithPriority @ /Applications/Joplin.app/Contents/Resources/app/node_modules/scheduler/cjs/scheduler.development.js:697
runWithPriority$2 @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12149
flushSyncCallbackQueueImpl @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12194
flushSyncCallbackQueue @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12182
scheduleUpdateOnFiber @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:23709
enqueueSetState @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:13994
Component.setState @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react/cjs/react.development.js:325
reloadNote @ /Applications/Joplin.app/Contents/Resources/app/gui/NoteText.min.js:651
_tickCallback @ internal/process/next_tick.js:68
async function (async)
reloadNote @ /Applications/Joplin.app/Contents/Resources/app/gui/NoteText.min.js:525
scheduleReloadNoteIID_.setTimeout @ /Applications/Joplin.app/Contents/Resources/app/gui/NoteText.min.js:514
setTimeout (async)
scheduleReloadNote @ /Applications/Joplin.app/Contents/Resources/app/gui/NoteText.min.js:513
UNSAFE_componentWillReceiveProps @ /Applications/Joplin.app/Contents/Resources/app/gui/NoteText.min.js:680
callComponentWillReceiveProps @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:14298
updateClassInstance @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:14511
updateClassComponent @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:18420
beginWork$1 @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:20186
beginWork$$1 @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:25756
performUnitOfWork @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24695
workLoopSync @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24671
performSyncWorkOnRoot @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:24270
(anonymous) @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12199
unstable_runWithPriority @ /Applications/Joplin.app/Contents/Resources/app/node_modules/scheduler/cjs/scheduler.development.js:697
runWithPriority$2 @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12149
flushSyncCallbackQueueImpl @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12194
flushSyncCallbackQueue @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12182
scheduleUpdateOnFiber @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:23709
enqueueSetState @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:13994
Component.setState @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react/cjs/react.development.js:325
onStateChange @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/components/connectAdvanced.js:222
notify @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/utils/Subscription.js:30
notifyNestedSubs @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/utils/Subscription.js:69
onStateChange @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/components/connectAdvanced.js:219
notify @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/utils/Subscription.js:30
notifyNestedSubs @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/utils/Subscription.js:69
onStateChange @ /Applications/Joplin.app/Contents/Resources/app/node_modules/react-redux/lib/components/connectAdvanced.js:219
dispatch @ /Applications/Joplin.app/Contents/Resources/app/node_modules/redux/lib/createStore.js:186
generalMiddleware @ /Applications/Joplin.app/Contents/Resources/app/lib/BaseApplication.js:394
generalMiddleware @ /Applications/Joplin.app/Contents/Resources/app/app.js:257
action @ /Applications/Joplin.app/Contents/Resources/app/lib/BaseApplication.js:331
refreshNotes @ /Applications/Joplin.app/Contents/Resources/app/lib/BaseApplication.js:283
_tickCallback @ internal/process/next_tick.js:68
/Applications/Joplin.app/Contents/Resources/app/node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Connect(NoteTextViewerComponent), Connect(ToolbarComponent)

log.txt:
log.txt

@D4nte D4nte added the bug It's a bug label Dec 30, 2019
@ABonner
Copy link

ABonner commented Jan 9, 2020

Seems to only happen with certain emoji/unicode characters.

😀foo is fine

@D4nte
Copy link
Author

D4nte commented Jan 10, 2020

Seems to only happen with certain emoji/unicode characters.

😀foo is fine

It looks like emojis that are 4 bytes are fine but the issue only appears with 3 bytes emojis: https://apps.timwhitlock.info/emoji/tables/unicode

@ABonner
Copy link

ABonner commented Jan 10, 2020

Appears to be an upstream bug in React-Ace, which is used for that editor panel.

Can be reproduced in the online demo http://securingsincity.github.io/react-ace/

@ABonner
Copy link

ABonner commented Jan 10, 2020

Which I guess is a React Wrapper around "Ace" which is a vanilla Javascript editor, with the same issue as well.

https://ace.c9.io/

@lowne
Copy link

lowne commented Jan 13, 2020

😢 ajaxorg/ace#4142 FWIW

@stale
Copy link

stale bot commented Apr 12, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Apr 12, 2020
@dbogdanov
Copy link

Still an issue.

@stale stale bot removed the stale An issue that hasn't been active for a while... label Apr 12, 2020
@tim-elmer
Copy link

As suggested by the presence of an upstream issue (#2244 (comment)), this also affects Windows (and presumably any other platform using ace).

@tim-elmer
Copy link

tim-elmer commented Jun 14, 2020

With some minimal playing around, the Code Mirror editor (#3284) seems to solve the issue, at least with characters that I've observed breaking in Ace, as well as the ones listed in ajaxorg/ace#4142.

One oddity that I noticed is that compound emoji (?; not sure what to call them) are split into their components in the editor, but rendered as expected in the preview. Some examples; 🤦‍♀️, 👮‍♀️, 👨‍⚕️, 👨‍🌾. Screenshot: image

I'm using the windows 1.0.220 build.

@stale
Copy link

stale bot commented Jul 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Jul 14, 2020
@D4nte
Copy link
Author

D4nte commented Jul 15, 2020

Not yet solved but looks like it's getting there.

@stale stale bot removed the stale An issue that hasn't been active for a while... label Jul 15, 2020
@stale
Copy link

stale bot commented Aug 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Aug 14, 2020
@D4nte
Copy link
Author

D4nte commented Aug 17, 2020

Not resolved (just tested with 1.0.233 on Mac).

@stale stale bot removed the stale An issue that hasn't been active for a while... label Aug 17, 2020
@stale
Copy link

stale bot commented Sep 16, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added stale An issue that hasn't been active for a while... and removed stale An issue that hasn't been active for a while... labels Sep 16, 2020
@D4nte
Copy link
Author

D4nte commented Sep 20, 2020

Not resolved on Joplin 1.0.245 (prod, darwin)

@stale
Copy link

stale bot commented Oct 20, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Oct 20, 2020
@D4nte
Copy link
Author

D4nte commented Oct 21, 2020

Resolved in Joplin 1.2.6 (prod, darwin)

@D4nte D4nte closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug stale An issue that hasn't been active for a while...
Projects
None yet
Development

No branches or pull requests

5 participants