{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/editing/issues/150","repository_url":"https://api.github.com/repos/w3c/editing","labels_url":"https://api.github.com/repos/w3c/editing/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/w3c/editing/issues/150/comments","events_url":"https://api.github.com/repos/w3c/editing/issues/150/events","html_url":"https://github.com/w3c/editing/issues/150","id":179043895,"number":150,"title":"Removal of browser built-in Undo stack functionality from contenteditable","user":{"login":"johanneswilm","id":595512,"avatar_url":"https://avatars.githubusercontent.com/u/595512?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneswilm","html_url":"https://github.com/johanneswilm","followers_url":"https://api.github.com/users/johanneswilm/followers","following_url":"https://api.github.com/users/johanneswilm/following{/other_user}","gists_url":"https://api.github.com/users/johanneswilm/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneswilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneswilm/subscriptions","organizations_url":"https://api.github.com/users/johanneswilm/orgs","repos_url":"https://api.github.com/users/johanneswilm/repos","events_url":"https://api.github.com/users/johanneswilm/events{/privacy}","received_events_url":"https://api.github.com/users/johanneswilm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2016-09-24T18:14:01Z","updated_at":"2016-09-27T23:03:47Z","closed_at":null,"body":"The subject  of removing the undo manager functionality from contenteditable by default came up at the Editing Taskforce F2F meeting on 2016-09-22 at TPAC in Lisboa, Portugal. It was pointed out that the browser's undo stack would be entirely useless once the JS editor interrupt the default behavior even in just a few limited cases. No-one present opposed the idea of removing the browser's undo functionality for contenteditable and replacing it by a way for the JS to enable/disable the menu entries for redo and undo + giving the ability to listen for redo/undo being triggered via beforeinput events.\r\n\r\nEveryone agreed to turn this functionality of by default. (given that there seems to be no authoritative spec that says that undo IS provided, we may only need to spec that undo is turned off be default).\r\n\r\nIn addition, the following JS editor projects were contacted and **all** of them responded that the browser's undo stack and default undo behavior was either **useless** or **harmful**:\r\n\r\n* CKEditor\r\n* ProseMirror\r\n* QuillJS\r\n* ContentTools library\r\n* Substance.io\r\n* TinyMCE\r\n* Froala\r\n\r\nThe following applications were investigated and it was determined that they use their own undo stacks (a separate stack for each input field):\r\n\r\n* Medium.js\r\n* Google Gmail\r\n* Microsoft Office 365\r\n* Apple iCloud Pages\r\n* Google Docs (only using very limited amount of contenteditable anyway)\r\n* Facebook's various input fields\r\n\r\n\r\n**One** working contenteditable webapp was found that makes use of the browser's undo stack:\r\n\r\n* Facebook's draft-js uses its own undo stack, but falls through to the native undo stack in case the last change was a spell checker fix, so that the browser learns that the change was unwanted and stops making the same suggestion in the future [1].\r\n\r\n[1] https://github.com/facebook/draft-js/blob/67c5e69499e3b0c149ce83b004872afdf4180463/src/component/handlers/edit/commands/keyCommandUndo.js#L24-L27\r\n\r\n*(This issue is updated as responses from developers arrive.)*\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/editing/issues/comments/250024532","html_url":"https://github.com/w3c/editing/issues/150#issuecomment-250024532","issue_url":"https://api.github.com/repos/w3c/editing/issues/150","id":250024532,"user":{"login":"rniwa","id":285965,"avatar_url":"https://avatars.githubusercontent.com/u/285965?v=3","gravatar_id":"","url":"https://api.github.com/users/rniwa","html_url":"https://github.com/rniwa","followers_url":"https://api.github.com/users/rniwa/followers","following_url":"https://api.github.com/users/rniwa/following{/other_user}","gists_url":"https://api.github.com/users/rniwa/gists{/gist_id}","starred_url":"https://api.github.com/users/rniwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rniwa/subscriptions","organizations_url":"https://api.github.com/users/rniwa/orgs","repos_url":"https://api.github.com/users/rniwa/repos","events_url":"https://api.github.com/users/rniwa/events{/privacy}","received_events_url":"https://api.github.com/users/rniwa/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T23:03:47Z","updated_at":"2016-09-27T23:03:47Z","body":"> In any case, we should plan for the separate undo stack, because this seems to be the main use case and defacto standard as of now.\r\n\r\nWe're fine with having that as an option but forcing that on all contenteditable content is definitely not okay for us."}}
{"actor":{"display_login":"rniwa"}}