Undo plugin
Could someone please try this sequence:
1) type something (anything really)
2) hit ctrl+z
3) type something else
4) hit ctrl+z
What do you see?
What I would expect is that the text I typed in 3 is removed, but instead nothing happens. And if I click the "redo" icon then the text I removed with the ctrl+z of 2 appears again, removing the text I types in 3.
Re: Undo plugin
Reply #1 –
Behavior seems to depend on how quickly I hit crtl-z but yeah I can reproduce what you said above.
There may have been an editor fix to help with this, not sure.
When the "latest" 1.5.x editor was released, there was still a myriad of issues open, but instead of fixing them in the 1.5.x branch most were pushed to a new 2.X branch, which of course will force us to change just about every plugin and interaction with the editor. I've been back porting some of the fixes to a 1.X elk branch so we can try that but have mixed feelings about the entire thing.
I'm kind of tired of dealing with the editors development, two many things are left broken in ..x releases, and then fixes do become available they are in a version that requires API changes everywhere breaking the core and addons and not fitting well in any release cycles.
Re: Undo plugin
Reply #4 –
I marked them to be removed, now someone just needs to do so.
Re: Undo plugin
Reply #7 –
We need to make a tweak to fix the editor focus messing up the page scroll to a named link on load. I'll comment in the gist in a bit.
Re: Undo plugin
Reply #9 –
On editor init the undo plugin does an editor focus event to get the initial cursor position in the editor.
This is not normally a problem unless you have the full editor set in Quick Reply. In that case the focus event will pull the screen down to the editor area (as some browsers feel that is in focus) overriding any #blabla in the url like #new.
Re: Undo plugin
Reply #11 –
Now the funny part is I have no idea of the changes you made because everything is minified. xD
Re: Undo plugin
Reply #14 –
gist can be strange.
Anyway the change is simple, it just avoids the editor focus event (needed to get cursor position) when the editor is empty. When empty the cursor is at 0,0