Code Monkey home page Code Monkey logo

Comments (6)

zbryikt avatar zbryikt commented on June 4, 2024 1

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.

thednp avatar thednp commented on June 4, 2024 1

Change implemented and solved issues. New version online now.

from bootstrap.native.

thednp avatar thednp commented on June 4, 2024

Please provide a test pen/fiddle to look into it.

from bootstrap.native.

zbryikt avatar zbryikt commented on June 4, 2024

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.

thednp avatar thednp commented on June 4, 2024

@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.

zbryikt avatar zbryikt commented on June 4, 2024

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)

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.