ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: kode54 on July 08, 2018, 09:19:30 pm

Title: [1.1.4] Undo/Ctrl+Z causes a console error in the WYSIWYG editor
Post by: kode54 on July 08, 2018, 09:19:30 pm
Forwarded from this topic on our forum (https://hydrogenaud.io/index.php/topic,116229.0.html):

Pressing ctrl+Z (undo) in editor will cause JS error, which breaks any further ctrl+Z shortcut.

The GIF below shows the bug:

(Link-6072)

The error:

Code: [Select]
hive-0f87c727262fa4155705f5ea3ac671aa59529e0e.js?x53279192:7 Uncaught TypeError: Cannot read property 'value' of undefined
    at d (hive-0f87c727262fa4155705f5ea3ac671aa59529e0e.js?x53279192:7)
    at v.o.undo (hive-0f87c727262fa4155705f5ea3ac671aa59529e0e.js?x53279192:7)
    at HTMLTextAreaElement.oe (hive-0f87c727262fa4155705f5ea3ac671aa59529e0e.js?x53279192:4)
    at HTMLTextAreaElement.dispatch (jquery-3.1.1.min.js:3)
    at HTMLTextAreaElement.q.handle (jquery-3.1.1.min.js:3)

It can be reproduced in both Chrome and Firefox, both are tested in clean profiles with NO extension/addon.
Title: Re: [1.1.4] Undo/Ctrl+Z causes a console error in the WYSIWYG editor
Post by: Spuds on July 11, 2018, 07:54:50 am
Thanks for the report ... indeed something is wrong here, I've tracked it.
Title: Re: [1.1.4] Undo/Ctrl+Z causes a console error in the WYSIWYG editor
Post by: Spuds on July 11, 2018, 05:07:24 pm
@emanuele  ...  Looks like its something to do with this change ... https://github.com/Spuds/SCEditor/commit/cabaaee54503a8ae6be0581450bcd59a0af387c8#diff-12899573d29acca372814c3c7eb5d860 so if you get some time to review that would be great  O:-)
Title: Re: [1.1.4] Undo/Ctrl+Z causes a console error in the WYSIWYG editor
Post by: Spuds on July 28, 2018, 07:23:01 am
This should fix the issue ....

https://github.com/Spuds/Elkarte/commit/cd8684ad68795c3da82970ff1e8b8ea3e0ed8176