{"action":"created","issue":{"url":"https://api.github.com/repos/vitalets/x-editable/issues/851","labels_url":"https://api.github.com/repos/vitalets/x-editable/issues/851/labels{/name}","comments_url":"https://api.github.com/repos/vitalets/x-editable/issues/851/comments","events_url":"https://api.github.com/repos/vitalets/x-editable/issues/851/events","html_url":"https://github.com/vitalets/x-editable/issues/851","id":125356693,"number":851,"title":" Failed to execute 'setSelectionRange' on 'HTMLInputElement'","user":{"login":"jcubic","id":280241,"avatar_url":"https://avatars.githubusercontent.com/u/280241?v=3","gravatar_id":"","url":"https://api.github.com/users/jcubic","html_url":"https://github.com/jcubic","followers_url":"https://api.github.com/users/jcubic/followers","following_url":"https://api.github.com/users/jcubic/following{/other_user}","gists_url":"https://api.github.com/users/jcubic/gists{/gist_id}","starred_url":"https://api.github.com/users/jcubic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcubic/subscriptions","organizations_url":"https://api.github.com/users/jcubic/orgs","repos_url":"https://api.github.com/users/jcubic/repos","events_url":"https://api.github.com/users/jcubic/events{/privacy}","received_events_url":"https://api.github.com/users/jcubic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-07T09:28:13Z","updated_at":"2016-01-07T11:13:13Z","closed_at":null,"body":"When I use number input I've got error \r\n```\r\nUncaught InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': \r\nThe input element's type ('number') does not support selection.\r\n```"},"comment":{"url":"https://api.github.com/repos/vitalets/x-editable/issues/comments/169633023","html_url":"https://github.com/vitalets/x-editable/issues/851#issuecomment-169633023","issue_url":"https://api.github.com/repos/vitalets/x-editable/issues/851","id":169633023,"user":{"login":"jcubic","id":280241,"avatar_url":"https://avatars.githubusercontent.com/u/280241?v=3","gravatar_id":"","url":"https://api.github.com/users/jcubic","html_url":"https://github.com/jcubic","followers_url":"https://api.github.com/users/jcubic/followers","following_url":"https://api.github.com/users/jcubic/following{/other_user}","gists_url":"https://api.github.com/users/jcubic/gists{/gist_id}","starred_url":"https://api.github.com/users/jcubic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcubic/subscriptions","organizations_url":"https://api.github.com/users/jcubic/orgs","repos_url":"https://api.github.com/users/jcubic/repos","events_url":"https://api.github.com/users/jcubic/events{/privacy}","received_events_url":"https://api.github.com/users/jcubic/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T11:13:13Z","updated_at":"2016-01-07T11:13:13Z","body":"The fix will be something like:\r\n```javascript\r\n        activate: function() {\r\n            if(this.$input.is(':visible')) {\r\n                this.$input.focus();\r\n                if (this.$input.attr('type') != 'number') {\r\n                    $.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length);\r\n                }\r\n                if(this.toggleClear) {\r\n                    this.toggleClear();\r\n                }\r\n            }\r\n        },\r\n```"}}