Git Product home page Git Product logo

Comments (7)

ztischenkosilobreaker avatar ztischenkosilobreaker commented on July 21, 2024 8

I had the same issue with 'use' tags that we use inside 'svg' tags. To fix this error you can extend SVGAnimatedString prototype (as this is a type that className property returns in this case - apparently it does not have indexOf method, hence the unhandled exception), like this:

(SVGAnimatedString.prototype as any).indexOf = (() => {
    return function() {
        return this.baseVal.indexOf.apply(this.baseVal, arguments);
    };
})();

Once you drop this inside root directory of your app, the issue will be resolved as now your 'use' tags (or any other tag that returns type SVGAnimatedString type, rather then string, for className property of the node element) will have indexOf method.

In my case adding 'notranslate' to each svg was not best solution as on the page there was a lot of svgs added at different times by different components.

Hope it will help someone out there as well.

from angular-multi-select.

isteven avatar isteven commented on July 21, 2024

Hi @Hypercubed, noted the fix.

Before I merge, can I see how to reproduce this bug? Maybe you can paste your controllers & views in JsFiddle or Plunker. Thanks!

from angular-multi-select.

Hypercubed avatar Hypercubed commented on July 21, 2024

Sure... look here: http://plnkr.co/edit/cg7wpW?p=preview

Click on the multi-select then click on the lion. The multi-select doesn't close.

from angular-multi-select.

Hypercubed avatar Hypercubed commented on July 21, 2024

You will see the output:

Uncaught TypeError: undefined is not a function angular-multi-select.js:447

from angular-multi-select.

isteven avatar isteven commented on July 21, 2024

After I saw the SVG sample case you provided & googling around, I realized there's a much better way of handling the button's toggle.

As for now I'm working on the group / category feature, so I'll just merge your solution as a first-aid fix. Thanks @Hypercubed ! :)

from angular-multi-select.

sandun86 avatar sandun86 commented on July 21, 2024

Turns out the issue is due to Google's Translate extension. Disabling it solve the problem.

from angular-multi-select.

mattferrin avatar mattferrin commented on July 21, 2024

@sandun86 Thanks.

from angular-multi-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.