Hi Andrew

There were two reasons I dropped the undo/redo buttons, one superficial, and 
one more fundamental:

* The endless problems I encountered getting the execCommand() call to work 
consistently across browsers. This is a notorious area for poor cross-browser 
compatibility, and there is every indication that it’s impossible to make the 
native execCommand(“undo”) work with textareas under Firefox.
* The deeper problem that the OS undo/redo only extends back to the last time 
that the textarea was refreshed. To an end user, the result is highly 
confusing: one can only undo back to an arbitrary and unpredictable point

So, my conclusion was that decent undo/redo handling will require us to 
engineer the undo/redo logic ourselves.

Best wishes

Jeremy


> On 8 May 2016, at 10:10, Andrew <[email protected]> wrote:
> 
> I have still been trying to figure out why undo was acting strange and I am 
> so close. I think that the functionality was all there. It is just a matter 
> of doing something like the following, but I can't quite figure it out how to 
> capture the text of the hidden dummy iframe after the undo but nothing seems 
> to work:
> in undo.js:
>     document.execCommand("undo", false, null);
>     operation.replacement = textarea.value;
> 
> or 
>     document.execCommand("undo", false, null);
>     operation.replacement = 
> this.parentDomNode.getElementsByTagName("textarea")[0].value;
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/18141e07-71d2-4f69-b93b-44b2f7833ac9%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/18141e07-71d2-4f69-b93b-44b2f7833ac9%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/105C7FD9-0AB1-4575-B0B8-9FADE98721BE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to