Comments (6)
A possible fix is to rewrite these:
t.href.slice(-1)
t.parentNode.href.slice(-1)
into these:
t.getAttribute('href')).slice(-1)
t.parentNode.getAttribute('href')).slice(-1)
since the return value of getAttribute("href")
is guaranteed to be a string, based on DOM Level 2 Spec and SVG is compatible with DOM Level 2.
I made a patch in a forked repo but tend to not send a PR for now, only for your reference: zbryikt@737dc2e
I found href.slice
in both src/util/isEmptyAnchor.js
and src/components/dropdown-native.js
so I patched both of them in that commit.
from bootstrap.native.
Change implemented and solved issues. New version online now.
from bootstrap.native.
Please provide a test pen/fiddle to look into it.
from bootstrap.native.
It seems that v4 is now in a separated branch (not sure if it's still maintained since there is no separated release for v4 currently) and it doesn't seem to still available in the latest release files so I'm not sure what's the latest officially released version for v4, so in case that I use a wrong version of code, I copied all code from latest snapshot of dist/bootstrap-native.min.js in bs-4 branch directly and make a pen here:
https://codepen.io/loadingio/pen/YzRpJvz
To reproduce, simply toggle the dropdown on and then click the red circle, which is a SVG image tag with data url in itshref
attribute.
Have also tried v5 and it seems to work correctly but we don't use v5 so not sure if we've done it right - since this issue mainly discuss v4, I will skip that part here. :)
(migration to v5 will be a big task and when we are ready there will be probably v6 so we will still use bootstrap v4 for some time. )
from bootstrap.native.
@zbryikt just that you know, I've updated the local repo on my machine with the proposed changes but I'm having problems with some dependencies vulnerabilities, we might have to wait a couple of days to get them sorted out.
from bootstrap.native.
No worries! It's an open-source project so please don't feel any pressure, especially this bs-4 branch is more like a legacy version. We can use the forked custom built version first. Thank you for this awesome lib! :)
from bootstrap.native.
Related Issues (20)
- modal.dispose can cause issues if used in hidden.bs.modal HOT 5
- dropdown not support autoclose attribute HOT 1
- tab issues HOT 8
- getInstance behavior change between v4.1 and v4.2? HOT 4
- Popover positioning within sidebar with position fixed HOT 10
- types location needs to be fixed in package.json HOT 1
- dorpdown not support foreach
- Issues with closing a dropdown HOT 4
- offcanvas toggle bottom HOT 3
- BSN 5.0 comes with full Typescript source HOT 1
- Popover overflows bottom HOT 10
- Navbar with off-canvas drawer is hidden by backdrop HOT 5
- Popover button HOT 3
- Replace Bootstrap 4 HOT 1
- Where are the bootstrap 4 docs? HOT 1
- about source code HOT 5
- Dropdown menu closes instantly if user clickes on a span element inside the triggering button HOT 6
- Bootstrap 4 to BSN migration HOT 2
- Should not import the named export 'version' HOT 2
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.