Comments (7)
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.
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.
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.
You will see the output:
Uncaught TypeError: undefined is not a function angular-multi-select.js:447
from angular-multi-select.
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.
Turns out the issue is due to Google's Translate extension. Disabling it solve the problem.
from angular-multi-select.
@sandun86 Thanks.
from angular-multi-select.
Related Issues (20)
- How to add tooltip for each dropdown element? HOT 9
- how to add default text when data is not bound to multiselect? HOT 1
- Reset doesn't set all values' 'ticked' property to false HOT 2
- output-model needn't be a compulsory attribute HOT 4
- Is there any angular 4 version of this available ? HOT 2
- Use same input-model to multiple multiselectors? HOT 4
- Select items from single group only
- XSS attack by option name
- Mutli select not support direction
- how to select all items loaded on the control??
- How to prevent .length == 'undefined' error when populating dropdown via on-open
- Filtering problem when grouped
- Grouping
- Issue injecting multi-select directive into another directive with same scope
- make filter clear button 'x' icon encoded
- Possible to launch dropdown from custom button?
- will it be possible to give remove option to the selected items in the ui HOT 1
- Search not working when grouping is enabled.
- Any ways to dynamically update helper-elements?
- Multiple elements selected when only one is clicked HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-multi-select.