###SUMMARY: Twitter.com "compose" text area undo granularity is seriously broken (far too coarse-grained).
###CONTEXT: OS X 10.8.5
Any Browser of:
- Chrome Version 31.0.1650.8 beta
- Safari Version 6.0.5 (8536.30.1)
- Firefox 24
###STEPS:
- visit twitter.com as logged in user in any browser listed above. see normal "Home" page appear.
- click blue "compose button". See "compose" text area appear
- type "foo bar baz" in compose text area
- use mouse to double click "bar". see "bar" text selected.
- type "hello world". see "bar" replaced by "hello world". (text is now "foo hello world baz")
- activate system "undo" command (type ⌘-Z or Main Menu > Edit > Undo Typing)
###EXPECTED RESULT: "hello world" should revert to "bar".
###ACTUAL RESULT: all text disappears from compose text area
###ADDITIONAL NOTES:
- This does not match user's expectations (on OS X at least, and I assume on other platforms as well).
- This is extremely annoying, as it can be experienced very easily in the normal flow of composing a tweet. I'd say I hit it in at least 50% of the tweets I compose on twitter.com
- It's also very surprising. HTML <textarea> elements do not normally exhibit this incorrect behavior. Twitter must be doing something extra to break undo in <textarea>s. Try the same steps in an HTML document containg:
<textarea></textarea>
. You will not be able to repro it there. - Also note that you can insert a lengthy time delay between steps 3 & 4, and still see this incorrect behavior.
I originally reported this on October 16, 2013. The bug was definitely not new at that time, as I had been hitting it for quite some time before bothering to report it. So this is not a new issue caused by an recent changes. It is a long-standing bug.