{"action":"closed","issue":{"url":"https://api.github.com/repos/tinymce/tinymce/issues/2291","repository_url":"https://api.github.com/repos/tinymce/tinymce","labels_url":"https://api.github.com/repos/tinymce/tinymce/issues/2291/labels{/name}","comments_url":"https://api.github.com/repos/tinymce/tinymce/issues/2291/comments","events_url":"https://api.github.com/repos/tinymce/tinymce/issues/2291/events","html_url":"https://github.com/tinymce/tinymce/issues/2291","id":113931260,"number":2291,"title":"Select-all then delete leaves a blank editor with an empty <p> and no <br> in Chrome","user":{"login":"TinyMCE-User","id":14879844,"avatar_url":"https://avatars.githubusercontent.com/u/14879844?v=3","gravatar_id":"","url":"https://api.github.com/users/TinyMCE-User","html_url":"https://github.com/TinyMCE-User","followers_url":"https://api.github.com/users/TinyMCE-User/followers","following_url":"https://api.github.com/users/TinyMCE-User/following{/other_user}","gists_url":"https://api.github.com/users/TinyMCE-User/gists{/gist_id}","starred_url":"https://api.github.com/users/TinyMCE-User/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TinyMCE-User/subscriptions","organizations_url":"https://api.github.com/users/TinyMCE-User/orgs","repos_url":"https://api.github.com/users/TinyMCE-User/repos","events_url":"https://api.github.com/users/TinyMCE-User/events{/privacy}","received_events_url":"https://api.github.com/users/TinyMCE-User/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tinymce/tinymce/labels/browser:%20chrome","name":"browser: chrome","color":"ededed"},{"url":"https://api.github.com/repos/tinymce/tinymce/labels/component:%20keyboard","name":"component: keyboard","color":"bfe5bf"},{"url":"https://api.github.com/repos/tinymce/tinymce/labels/origin:%20tinymce.com","name":"origin: tinymce.com","color":"ededed"},{"url":"https://api.github.com/repos/tinymce/tinymce/labels/type:%20bug","name":"type: bug","color":"555555"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-07-01T02:08:08Z","updated_at":"2016-07-25T02:03:24Z","closed_at":"2016-07-25T02:03:24Z","body":"Description of problem: if I select all contents of an inline editor and then delete them, an empty &ltg;p>&ltg;/p> tag is left behind without a bogus &ltg;br>, and the cursor disappears or shrinks.  The empty &ltg;p> happens in any inline editor instance, but is most visually obvious in an editor with a flex column layout (the real issue is the empty &ltg;p>&ltg;/p> left behind in Chrome where other browsers insert a &ltg;br> -- it's not a flex issue).\r\n\r\nThis only occurs if multiple elements are deleted; if there's only one element in the editor and it is deleted, a bogus &ltg;br> is inserted correctly in the &ltg;p>.\r\n\r\nIt only happens in Chrome. In Firefox and SeaMonkey (a Mozilla derivative) it works fine (the &ltg;br> is inserted and the cursor appears).\r\n\r\nSteps to reproduce:\r\n1. set up an inline editor with multiple elements (eg. lines of text)\r\n2. select-all\r\n3. delete\r\n4. the cursor may go to the first line, but jump down when any text is entered (or even just hitting &ltg;enter>\r\n5. in a flex column layout (vertically centered), the cursor disappears completely and can only be restored by typing in the editor (see fiddle)\r\n\r\nExpected result: a &ltg;br> bogus element should be left behind after the editor's contents are removed.\r\n\r\nActual result: only an empty &ltg;p>&ltg;/p> is left behind (as seen in the DOM inspector), leaving the cursor state indeterminate.\r\n\r\nHere's another fiddle without flex layout; the cursor doesn't disappear but is diminished because the &ltg;p> is empty: http://fiddle.tinymce.com/pQeaab/4\r\n\r\nThanks.\n> _**Legacy information imported from TinyMCE bug tracker:**_\n>\n> _[#T7579](http://archive.tinymce.com/develop/bugtracker_view.php?id=7579) posted by [TrevorPT](http://archive.tinymce.com/profile.php?name=TrevorPT)_\n\n> _**Tags:** [chrome chrome]_\n> _**Status:** Open_\n> _**Resolution:** None_\n> _**Attached URL:** http://fiddle.tinymce.com/pQeaab/3_\n"}}
{"actor":{"display_login":"blackcathikari"}}