jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers
https://intl-tel-input.com
MIT License
7.54k stars 1.94k forks source link

Padding isn't removed from input when instance is destroyed #1697

Closed john-ackerman closed 1 month ago

john-ackerman commented 1 month ago

Plugin version

v23.1.1

Steps to reproduce

  1. Apply intl-tel-input to an input element with separateDialCode set to true
  2. Destroy the intl-tel-input instance that was created

Expected behaviour

The padding that is added to prevent text from overlapping with the dial code should be removed when intl-tel-input is destroyed

Actual behaviour

The padding remains and must be manually removed

Initialisation options

separateDialCode

From what I can tell this isn't an issue when separateDialCode is set to false, because that doesn't add a style tag to the element.

jackocnr commented 1 month ago

Good catch, thanks. I'm afraid I don't have time to implement this myself right now, but I would be open to a pull request.

jackocnr commented 1 month ago

Fixed in v23.4.1.