Giter Club home page Giter Club logo

Comments (15)

nick-alvento avatar nick-alvento commented on July 2, 2024 1

can't we just get a 2.9.2 to fix this, it's been checked in #42

from dom-to-image-more.

orangeswim avatar orangeswim commented on July 2, 2024

also happens in my react project

from dom-to-image-more.

BrianM0330 avatar BrianM0330 commented on July 2, 2024

If anyone's working on 2.8.0 (from that StackOverflow solution), and wants the fix for #29, I have something for you!

Modify the dom-to-image-more file inside your node-modules to include the solution. There's no version between 2.8.0 and 2.9.1, so this'll make do.

Replace the cloneStyle() function with this block of code
` function cloneStyle() {
copyStyle(window.getComputedStyle(original), clone.style);

            function copyStyle(source, target) {
                if (source.cssText) {
                    target.cssText = source.cssText;
                    target.font = source.font; // here, we re-assign the font prop.
                } else copyProperties(source, target);

                function copyProperties(source, target) {
                    util.asArray(source).forEach(function(name) {
                        target.setProperty(
                            name,
                            source.getPropertyValue(name),
                            source.getPropertyPriority(name)
                        );
                    });
                }

                if (root) {
                    ['inset-block', 'inset-block-start', 'inset-block-end'].forEach((prop) => target.removeProperty(prop));
                    ['left', 'right', 'top', 'bottom'].forEach((prop) => {
                        if (target.getPropertyValue(prop)) {
                            target.setProperty(prop, '0px');
                        }
                    });
                }
            }
        }`

This will work until you run npm/update packages (I think). I can fork this if anyone else is running into the same niche bug.

from dom-to-image-more.

talhaamjadx avatar talhaamjadx commented on July 2, 2024

@barboite were you able to fix this issue?

from dom-to-image-more.

barboite avatar barboite commented on July 2, 2024

@talhaamjadx mmhhh, tried to paste this in my node_modules/dom-to-image-more/src/dom-to-image-more.js and re-built my front. It doesn't work, still the same error. Am i supposed to re-install deps with npm ? i'm not familiar with modifying inside node_modules

from dom-to-image-more.

 avatar commented on July 2, 2024

The latest commits also contain a unreleased fix for the Karma test workflow. Any ETA on release @IDisposable?

from dom-to-image-more.

IDisposable avatar IDisposable commented on July 2, 2024

Should be fixed in v2.9.4

from dom-to-image-more.

19BC83 avatar 19BC83 commented on July 2, 2024

Unfortunately it's not fixed with v2.9.4 - the problem persits as mentioned in #42 . Downgrading to v2.8.0 solves the problem and is still working properly without TypeError in my project.

from dom-to-image-more.

IDisposable avatar IDisposable commented on July 2, 2024

Can you please point me at a source code reproduction of this issue?

from dom-to-image-more.

 avatar commented on July 2, 2024

Also I hate to be "that techie" but could you confirm the cache been sufficiently cleared to ensure that it was indeed 2.9.4 throwing the error?

from dom-to-image-more.

19BC83 avatar 19BC83 commented on July 2, 2024

Also I hate to be "that techie" but could you confirm the cache been sufficiently cleared to ensure that it was indeed 2.9.4 throwing the error?

Thanks for your hint.

Procedure, starting from a flawless Angular v13 project (no error running v2.8.0):
=> npm i dom-to-image-more@latest => clearing browser-cache => restarting dev-server => failure with TypeError
=> npm i [email protected] => restarting dev-server => project is running flawlessly again

Any objections?

from dom-to-image-more.

 avatar commented on July 2, 2024

Could you paste that TypeError log here?

from dom-to-image-more.

19BC83 avatar 19BC83 commented on July 2, 2024

Could you paste that TypeError log here?

The TypeError is mentioned in #42.

from dom-to-image-more.

IDisposable avatar IDisposable commented on July 2, 2024

Fixed in v2.9.5, sorry for the inability to test before...

from dom-to-image-more.

IDisposable avatar IDisposable commented on July 2, 2024

Closing since nobody has complained that v2.9.5 didn't fix this more than a year ago :)

from dom-to-image-more.

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.