Closed MikeRidgway closed 4 years ago
I'm able to get this to happen when I use an em dash character (pasted in or inserted using a macro). Posting the error, assuming it's the same as above.
In URL:
Error: Failed to execute 'setEnd' on 'Range': The offset 12 is larger than the node's length (10).
at setRangeInContenteditable (https://easycaped-1.firebaseapp.com/js/caped-editor.js:2524:15)
at https://easycaped-1.firebaseapp.com/js/caped-editor.js:2507:9
at
Error source:
Context:
There seems to be something strange with the handling of em dash in contenteditable fields. I suspect it is a Chrome bug, but I do not give it a high priority to investigate it now. Please avoid em-dash for now. Is it possible to use something like -- instead for now? (That could easily be changed in some post-processing.)
@MikeRidgway How do you insert em dash? Do you type it on your keyboard, or?
I have a macro program where I have created a macro that simply types an em-dash character. Recently, doing the same thing had no problems at all.
On Wed, Jan 31, 2018 at 2:24 PM, lborgman notifications@github.com wrote:
@MikeRidgway https://github.com/mikeridgway How do you insert em dash? Do you type it on your keyboard, or?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lborgman/easy-cap-ed/issues/111#issuecomment-362059338, or mute the thread https://github.com/notifications/unsubscribe-auth/AED-sUzVHz10GaegcZQICAW0oXCRoxPUks5tQMvvgaJpZM4RbRPY .
Thanks @MikeRidgway I have not tested pasting an em dash for some while now. I will test it and see what happens here. Maybe I can close this issue after that.
This was a bit difficult. I think it is nearly fixed now. I have to get caret positions correct too.
It should work now. @MikeRidgway , please tell me if you see any problem now, ver 0.70.225.
(One problem that remains is the button I have created too insert em-dash. Not sure how that should work.)
In URL:
Error: Failed to execute 'setEnd' on 'Range': The offset 6 is larger than the node's length (5). at setRangeInContenteditable (https://easycaped-1.firebaseapp.com/js/caped-editor.js:2524:15) at https://easycaped-1.firebaseapp.com/js/caped-editor.js:2507:9 at
Error source:
Context: