{"action":"created","issue":{"url":"https://api.github.com/repos/vector-im/riot-web/issues/7472","repository_url":"https://api.github.com/repos/vector-im/riot-web","labels_url":"https://api.github.com/repos/vector-im/riot-web/issues/7472/labels{/name}","comments_url":"https://api.github.com/repos/vector-im/riot-web/issues/7472/comments","events_url":"https://api.github.com/repos/vector-im/riot-web/issues/7472/events","html_url":"https://github.com/vector-im/riot-web/issues/7472","id":368518675,"node_id":"MDU6SXNzdWUzNjg1MTg2NzU=","number":7472,"title":"Composer loses focus after typing emoji","user":{"login":"dbkr","id":986903,"node_id":"MDQ6VXNlcjk4NjkwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/986903?v=4","gravatar_id":"","url":"https://api.github.com/users/dbkr","html_url":"https://github.com/dbkr","followers_url":"https://api.github.com/users/dbkr/followers","following_url":"https://api.github.com/users/dbkr/following{/other_user}","gists_url":"https://api.github.com/users/dbkr/gists{/gist_id}","starred_url":"https://api.github.com/users/dbkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbkr/subscriptions","organizations_url":"https://api.github.com/users/dbkr/orgs","repos_url":"https://api.github.com/users/dbkr/repos","events_url":"https://api.github.com/users/dbkr/events{/privacy}","received_events_url":"https://api.github.com/users/dbkr/received_events","type":"User","site_admin":false},"labels":[{"id":239066467,"node_id":"MDU6TGFiZWwyMzkwNjY0Njc=","url":"https://api.github.com/repos/vector-im/riot-web/labels/bug","name":"bug","color":"fc2929","default":true},{"id":316424089,"node_id":"MDU6TGFiZWwzMTY0MjQwODk=","url":"https://api.github.com/repos/vector-im/riot-web/labels/minor","name":"minor","color":"fbca04","default":false},{"id":254874870,"node_id":"MDU6TGFiZWwyNTQ4NzQ4NzA=","url":"https://api.github.com/repos/vector-im/riot-web/labels/p1","name":"p1","color":"e11d21","default":false},{"id":457036988,"node_id":"MDU6TGFiZWw0NTcwMzY5ODg=","url":"https://api.github.com/repos/vector-im/riot-web/labels/type:composer","name":"type:composer","color":"5319e7","default":false},{"id":254196639,"node_id":"MDU6TGFiZWwyNTQxOTY2Mzk=","url":"https://api.github.com/repos/vector-im/riot-web/labels/ui/ux","name":"ui/ux","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-10T06:56:04Z","updated_at":"2018-10-11T09:59:38Z","closed_at":null,"author_association":"MEMBER","body":"...if it's the first character you type in the composer.\r\n\r\nI'm using the OS X emoji picker here: unsure if there's a way to repro it on other platforms. Focus composer, ctrl+cmd+space, pick an emoji, emoji goes into composer, press another letter, nothing happens. If you press space, you get a space and can carry on typing.\r\n\r\nHaving looked into this a little, the selection in the DOM is moving to the sticker button in the time between the composer's componentDidUpdate and a setTimeout(,0) in componentDidUpdate.\r\n\r\n```\r\ncomponentDidUpdate() {\r\n        console.log(\"i dun updated\");\r\n        const s = window.getSelection();\r\n        console.log(\"selection anchor: \", s.anchorNode); // <-- prints the last text node in composer\r\n        setTimeout(function() {\r\n            console.log(\"selection anchor: \", s.anchorNode); <-- prints sticker button\r\n        }, 0);\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/vector-im/riot-web/issues/comments/428896234","html_url":"https://github.com/vector-im/riot-web/issues/7472#issuecomment-428896234","issue_url":"https://api.github.com/repos/vector-im/riot-web/issues/7472","id":428896234,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODg5NjIzNA==","user":{"login":"lampholder","id":1922197,"node_id":"MDQ6VXNlcjE5MjIxOTc=","avatar_url":"https://avatars2.githubusercontent.com/u/1922197?v=4","gravatar_id":"","url":"https://api.github.com/users/lampholder","html_url":"https://github.com/lampholder","followers_url":"https://api.github.com/users/lampholder/followers","following_url":"https://api.github.com/users/lampholder/following{/other_user}","gists_url":"https://api.github.com/users/lampholder/gists{/gist_id}","starred_url":"https://api.github.com/users/lampholder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lampholder/subscriptions","organizations_url":"https://api.github.com/users/lampholder/orgs","repos_url":"https://api.github.com/users/lampholder/repos","events_url":"https://api.github.com/users/lampholder/events{/privacy}","received_events_url":"https://api.github.com/users/lampholder/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T09:59:38Z","updated_at":"2018-10-11T09:59:38Z","author_association":"MEMBER","body":"I really wish you could merge issues on github, but you can't, so I'm going to copy+pasta everything Dave's said here onto #7281 "}}
{"actor":{"display_login":"lampholder"}}