MacFJA / enyo2-lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blank Change first part - Bug

hamilTek opened this issue · comments

Hey, just took a look at your Undo/Redo sample on enyojs.com. I thought I would mention a bug. If you click the "Change first part" button but the text field is blank (so Hello is replace with blank) then try to Undo from that, you can't. This appears to break your Redo functionality also. After I blank out the first part (Hello), and then make a few changes (first part = "Test"; second part = "me") then undo my changes back to where the string is "- world" (with the blank Hello), if I try to Redo from there it won't add back in the "Test" and "me".

Again, I just wanted to post a potential bug. Hope this helps

Thanks to pointing out this problem!

This bug can be reproduced with all falsy value (undefined, false, 0, NaN, and empty string)!
So if you use UndoRedo on a checkbox... it will not work!!

I found the correction but i'm not at home, i will send it this evening.

I hope that the bug is now fixed