Page MenuHomePhabricator

[TUX] Insertables don't add state in undo stack
Closed, ResolvedPublicBUG REPORT

Description

If you tried to undo insertable insertion with Ctrl-z, it will remove also part of the text you typed earlier.

Fixing this is possible in some modern browsers, see:

Perhaps the VE team has a solution for this as well.

Details

Reference
bz62099

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:07 AM
bzimport set Reference to bz62099.
bzimport added a subscriber: Unknown Object (MLST).
Nikerabbit changed the subtype of this task from "Task" to "Bug Report".Dec 7 2020, 3:32 PM
Nikerabbit updated the task description. (Show Details)
Nikerabbit removed a subscriber: wikibugs-l-list.

Usual workaround seems to use document.execCommand(), however:

  • It seems to have some performance issue.
  • It is obsolete and non-standard.

Ref: https://stackoverflow.com/questions/44471699/how-to-make-undo-work-in-an-html-textarea-after-setting-the-value

WikiEditor uses a custom jQuery textSelection plugins which seems to work well cross browser. It had the same issue than this one (T33780) but that seems to be fixed.

matmarex claimed this task.
matmarex subscribed.

This seems to work correctly now. It looks like TUX is using jquery.textSelection, and its behavior was recently improved in T33780.