Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Issue with copy / paste #26

Closed
shamoons opened this issue Aug 17, 2019 · 7 comments
Closed

Issue with copy / paste #26

shamoons opened this issue Aug 17, 2019 · 7 comments
Assignees

Comments

@shamoons
Copy link

I'm submitting a ... (check one with "x")

[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • Vue.js version : 2.6.10
  • Browser name and version : Chrome|Firefox|Safari x.x.x
  • This package version : 2.1.3

Current behavior
When I copy / paste into a phone formatted field, it strips out characters seemingly at random. In my clipboard, I have +1-123-456-7890, but when I paste, it gives +1 11

Expected behavior
When I paste, it should be the full formatted number.

Minimal reproduction of the problem with instructions
My component code is:

              <cleave
                v-model="User.settings.phoneNumber"
                :options="cleaveOptions"
                class="form-control"
                placeholder="Enter mobile number"
                id="myPhoneNumberInput"
              ></cleave>

and

      cleaveOptions: {
        phone: true,
        phoneRegionCode: "US",
        prefix: "+1"
      }
@ankurk91 ankurk91 self-assigned this Aug 17, 2019
@ankurk91
Copy link
Owner

Can you also reproduce it with plain cleave.js?

@shamoons
Copy link
Author

Copy / Paste appears to be fine in cleave.js

@ankurk91
Copy link
Owner

Okay i will try to reproduce it tomorrow

@shamoons
Copy link
Author

shamoons commented Aug 17, 2019 via email

@ankurk91
Copy link
Owner

For me the plain cleave.js behave the same as vue.js version

https://jsfiddle.net/wq2svpre/4/

screen-record

@shamoons
Copy link
Author

Hmm - you're right. I can create a bug on the cleave.js github. I'll use your fiddle as an example, if that's okay.

@shamoons
Copy link
Author

nosir/cleave.js#505

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants