Closed stefann4 closed 1 month ago
The plugin doesn't do anything on blur - this must be your own code that is changing the input value on blur.
It is not my code, blur is just event where I am checking weather phone number is valid or not. Rest of it is just pure configuration of this plugin.
пет, 12. јул 2024. у 10:34 jackocnr @.***> је написао/ла:
The plugin doesn't do anything on blur - this must be your own code that is changing the input value on blur.
— Reply to this email directly, view it on GitHub https://github.com/jackocnr/intl-tel-input/issues/1698#issuecomment-2225091450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3ZYT6HM2XD7L22NCZMVJDZL6IIBAVCNFSM6AAAAABKX3PGM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVGA4TCNBVGA . You are receiving this because you authored the thread.Message ID: @.***>
I'm really confused. Can you please give clear steps to reproduce the problem. Give as much detail as possible.
Sure,
I'm using angular. I have installed needed package with npm command.
This is the configuration inside my .ts file:
ngAfterViewInit(): void {
this.input = (
This is my .html file connected with .ts file
</div>
When I try to manually input +381, after I occur event the +381 value converts to 0 manually. For example; If I input +381 123 123 1 it automatically changes to 01231231 and it doesn't give any information inside iti.getSelectedCountryData() with this format of 0.
суб, 13. јул 2024. у 00:49 jackocnr @.***> је написао/ла:
Reopened #1698.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
So to be clear, you initialise the plugin, you focus the input and type +381 and then you don't do anything else, the number just immediately changes on its own?
Correct.
On Sat, 13 Jul 2024 at 20:04, jackocnr @.***> wrote:
So to be clear, you initialise the plugin, you focus the input and type +381 and then you don't do anything else, the number just immediately changes on its own?
— Reply to this email directly, view it on GitHub https://github.com/jackocnr/intl-tel-input/issues/1698#issuecomment-2227034035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3ZYT74DZEZ2Z7DWLCJRG3ZMFT25AVCNFSM6AAAAABKX3PGM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGAZTIMBTGU . You are receiving this because you authored the thread.Message ID: @.***>
Actually, when I occur submit button, it automatically changes.
On Sat, 13 Jul 2024 at 20:54, stefan nikolic @.***> wrote:
Correct.
On Sat, 13 Jul 2024 at 20:04, jackocnr @.***> wrote:
So to be clear, you initialise the plugin, you focus the input and type +381 and then you don't do anything else, the number just immediately changes on its own?
— Reply to this email directly, view it on GitHub https://github.com/jackocnr/intl-tel-input/issues/1698#issuecomment-2227034035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3ZYT74DZEZ2Z7DWLCJRG3ZMFT25AVCNFSM6AAAAABKX3PGM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGAZTIMBTGU . You are receiving this because you authored the thread.Message ID: @.***>
Ah ok, so it's when you click the submit button. So what does your code do on submit? Does it reload the page?
Not really, all it does it calls a function which contains intl.getNumber() and after that it's http request not referred to your plugin
On Sat, 13 Jul 2024 at 23:29, jackocnr @.***> wrote:
Ah ok, so it's when you click the submit button. So what does your code do on submit? Does it reload the page?
— Reply to this email directly, view it on GitHub https://github.com/jackocnr/intl-tel-input/issues/1698#issuecomment-2227107718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV3ZYTYCIT4MWPBEVRFBDDTZMGL3RAVCNFSM6AAAAABKX3PGM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGEYDONZRHA . You are receiving this because you authored the thread.Message ID: @.***>
all it does it calls a function which contains intl.getNumber()
Well getNumber doesn't change the input value, so it's not that.
and after that it's http request not referred to your plugin
I don't understand this bit. Does the page reload? Do you navigate to another page which uses the plugin?
Can you share your submit handler code?
Closing due to inactivity.
Plugin version
e.g. v23.3.2 (please try latest version)
Steps to reproduce
This is my example of an input![image](https://github.com/user-attachments/assets/5e9a3b5f-eef4-4fde-88f9-8ae53bbf14de)
Expected behaviour
Since this is correct input for particular country, It should leave value like this.
Actual behaviour
Instead, everytime I leave this input tag (I'm using (blur) event in Angular) it changes value to this:![image](https://github.com/user-attachments/assets/e79646f5-e8d7-47af-b7dc-ee5911ce03ea)
This happens no matter what configuration put in my .ts file , this is my current configuration:
this.input = (<HTMLInputElement>document.getElementById("phone")); intlTelInput(this.input, { utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@23.3.2/build/js/utils.js", allowDropdown: true, nationalMode: true });
-I have tried with nationalMode: false too.Initialisation options
List any options you're using e.g. utilsScript or onlyCountries