Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocks option add previous block in mobile #362

Open
gurkanuzunca opened this issue Jun 4, 2018 · 4 comments
Open

blocks option add previous block in mobile #362

gurkanuzunca opened this issue Jun 4, 2018 · 4 comments

Comments

@gurkanuzunca
Copy link

i use like this, but when i type a number,it add previous block in chrome mobile browser.

+90 543 6 result;
press 5: +90 5
press 4: +90 554
press 3: +90 554 543
press 6: +90 554 543 5436

new Cleave('.mask', {
    blocks: [3,3,3,4],
    numericOnly: true,
    prefix: '+90',
    noImmediatePrefix: true
});
@kaYcee
Copy link

kaYcee commented Aug 2, 2018

I second this, observed the same in Firefox mobile (61.0). Is there a known fix by any chance?

@kaYcee
Copy link

kaYcee commented Aug 9, 2018

Just found out that this issue arises on Samsung phones with Smart Typing enabled on the default Samsung keyboard. This leads to onKeyDown events not being fired and a user-supplied onInput handler being fired twice, thus leading to text accumulation in the field.

@rison
Copy link

rison commented Apr 23, 2019

Yea, I think it's the Smart Typing thing causing the weird behaviour.

@Heidschnucke
Copy link

Problem occurs on various devices, e.g. Samsung Galaxy S8 with Android 8+.

The bug comes from this code potentially:

    // fix Android browser type="text" input field
    // cursor not jumping issue
    if (owner.isAndroid) {
        window.setTimeout(function () {
            owner.element.value = newValue;
            Util.setSelection(owner.element, endPos, pps.document, false);
            owner.callOnValueChanged();
        }, 1);

        return;
    }

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

No branches or pull requests

5 participants