Skip to content

Instantly share code, notes, and snippets.

@itod
Last active December 25, 2015 17:09
Show Gist options
  • Save itod/7011548 to your computer and use it in GitHub Desktop.
Save itod/7011548 to your computer and use it in GitHub Desktop.
twitter.com "Compose" undo bug report

###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:

  1. visit twitter.com as logged in user in any browser listed above. see normal "Home" page appear.
  2. click blue "compose button". See "compose" text area appear
  3. type "foo bar baz" in compose text area
  4. use mouse to double click "bar". see "bar" text selected.
  5. type "hello world". see "bar" replaced by "hello world". (text is now "foo hello world baz")
  6. 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.
@itod
Copy link
Author

itod commented Oct 22, 2014

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.

@itod
Copy link
Author

itod commented Oct 22, 2014

Update: I can still reproduce this but 100% of the time in Safari 7.1, Chrome 39, & Firefox 33 on OS X 10.9.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment