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

Error occurred when use UiAlert component in mobile mode. #236

Closed
bq-hentai27 opened this issue Feb 12, 2017 · 4 comments
Closed

Error occurred when use UiAlert component in mobile mode. #236

bq-hentai27 opened this issue Feb 12, 2017 · 4 comments
Labels

Comments

@bq-hentai27
Copy link

I tried to use ui-alert component in mobile mode. when I dismiss the alert, error occurred.

keen-ui.js?bc59:426 Uncaught TypeError: el.className.replace is not a function
    at classes (eval at <anonymous> (app.js:965), <anonymous>:426:29)
    at Object.contains (eval at <anonymous> (app.js:965), <anonymous>:465:19)
    at startRipple (eval at <anonymous> (app.js:965), <anonymous>:8380:40)
    at HTMLButtonElement.handleTouchStart (eval at <anonymous> (app.js:965), <anonymous>:8458:13)
classes @ keen-ui.js?bc59:426
contains @ keen-ui.js?bc59:465
startRipple @ keen-ui.js?bc59:8380
handleTouchStart @ keen-ui.js?bc59:8458

It is ok for pc.
I debugged & found the error occurred in the following fn.

function classes(el) {
    if (isElement(el)) {
        return el.className.replace(trim, '').split(whitespace);
    }

    return [];
}

The el.className is an instance of SVGAnimatedString and no replace fn.

@JosephusPaye
Copy link
Owner

Hmm, this is weird. Can you create an online demo reproducing the issue? Which browser are you using and what device?

@DXCanas
Copy link

DXCanas commented Feb 17, 2017

Can confirm this bug after opening Chromium's dev tools and hitting Toggle Device Toolbar in top left of dev tools section. Clicking dismiss on any alert causes the error.

Uncaught TypeError: e.className.replace is not a function
    at a (docs.bundle.js:1)
    at Object.c (docs.bundle.js:1)
    at s (docs.bundle.js:18)
    at HTMLButtonElement.l (docs.bundle.js:18)

Environment: Chromium Version 55.0.2883.87 Built on Ubuntu (Xenial Base) , running on LinuxMint 18.1 (64-bit)

@JosephusPaye
Copy link
Owner

Hi @DXCanas,

Thanks for the additional info, this has been fixed in 54de592, and will land in the next version.

@aalakoski
Copy link

aalakoski commented Jun 5, 2017

Hi,
Not sure if this is the same issue but this happens also in ui-datepicker opened from the input, while using the arrows to switch month.
Uncaught TypeError: el.className.replace is not a function at classes (eval at <anonymous> (app.js:1144), <anonymous>:426:29) at Object.contains (eval at <anonymous> (app.js:1144), <anonymous>:465:19) at startRipple (eval at <anonymous> (app.js:1144), <anonymous>:8380:40) at HTMLButtonElement.handleTouchStart (eval at <anonymous> (app.js:1144), <anonymous>:8458:13)
Confirmed.. It's about the same issue.

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

No branches or pull requests

4 participants