{"action":"closed","issue":{"url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/564","repository_url":"https://api.github.com/repos/jackocnr/intl-tel-input","labels_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/564/labels{/name}","comments_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/564/comments","events_url":"https://api.github.com/repos/jackocnr/intl-tel-input/issues/564/events","html_url":"https://github.com/jackocnr/intl-tel-input/issues/564","id":213071141,"number":564,"title":"Country doesn't change from pre-entered international dial code","user":{"login":"lucasket","id":24525512,"avatar_url":"https://avatars2.githubusercontent.com/u/24525512?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasket","html_url":"https://github.com/lucasket","followers_url":"https://api.github.com/users/lucasket/followers","following_url":"https://api.github.com/users/lucasket/following{/other_user}","gists_url":"https://api.github.com/users/lucasket/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasket/subscriptions","organizations_url":"https://api.github.com/users/lucasket/orgs","repos_url":"https://api.github.com/users/lucasket/repos","events_url":"https://api.github.com/users/lucasket/events{/privacy}","received_events_url":"https://api.github.com/users/lucasket/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-09T15:27:42Z","updated_at":"2017-03-13T13:00:16Z","closed_at":"2017-03-13T13:00:16Z","body":"### Steps to reproduce\r\n1.  Pre-fill the input with an international congolese number: +242066637556\r\n2.  Initialise intl-tel-input on the input element\r\n3.  Once utils.js has been loaded during the initialisation, call a function that validates the input.  The function uses the boolean `$('#phone').intlTelInput('isValidNumber')` to display (or not) error messages. It is called afterwards on each `'blur'` event.\r\n```javascript\r\n$('#phone').intlTelInput({\r\n\tutilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/11.0.4/js/utils.js',\r\n\tnationalMode: true,\r\n\tautoPlaceholder: \"off\",\r\n\tonlyCountries: [\r\n\t\t\"cm\", \"td\", \"cg\", \"ga\"\r\n\t],\r\n\tdropdownContainer: \"body\"\r\n}).done(function() { // Once utils.js, necessary for validation, is loaded\r\n\tpreValidateForm(); // Run the function on page load to detect whether the pre-entered number is valid\r\n});\r\n```\r\n\r\n### Expected behaviour\r\nFrom what I understand, intl-tel-input is supposed to use the international dial code to change the country.\r\n\r\n### Actual behaviour\r\nCongolese international dial code is removed, the displayed flag remains the one of the first country in the list (Cameroon). When no warning is displayed, it means `$('#phone').intlTelInput('isValidNumber') = true` has been verified.\r\n\r\n![peek 09-03-2017 16-35](https://cloud.githubusercontent.com/assets/24525512/23757211/74021014-04e6-11e7-826b-abef5c74e3b4.gif)\r\n"}}
{"actor":{"display_login":"lucasket"}}