W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Is clearUndo() in UndoManager the wrong way round?

From: Simon <simonzack@gmail.com>
Date: Sat, 14 Feb 2015 15:07:03 +1100
Message-ID: <54DEC9E7.4000903@gmail.com>
To: public-webapps@w3.org
I'm implementing a partial version of UndoManager myself, as I see it to 
be rather useful. I'm interpreting clearUndo as clearing any undo 
actions, so Ctrl+z will not do anything anymore. The spec states that 
clearUndo resets the position to 0, but is this the wrong way round? 
Since position increments whenever we undo, I would think that position 
should be set to the undo stack's length - 1.

Simon
Received on Tuesday, 17 February 2015 08:05:25 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC