Coder Social home page Coder Social logo

Comments (6)

kirushik avatar kirushik commented on July 27, 2024 1

@chevdor Brave returns zero from context.measureText call which is used to determine the appropriate canvas width in our component.
It is a well-known behavior intended to protect against browser fingerprinting, as documented in brave/brave-browser#1738

@prybalko probably we can detect measureText returning zero here, and fallback to some more sensible default than just 20px? I think privacy-conscious users would prefer the text being placed off-center in an ugly way over it not being visible at all.

from banana_split.

prybalko avatar prybalko commented on July 27, 2024

Please provide more information, I'm not able to reproduce the issue.
What version of banana split are you using? Is it the one deployed on https://bs.parity.io or from master branch?
What OS and browser are you using?

from banana_split.

chevdor avatar chevdor commented on July 27, 2024

I am using https://bs.parity.io and Brave Version 1.31.88 Chromium: 95.0.4638.69 (Official Build) (x86_64) on MacOS (Monterey).
I did download the html and opened it. I did not go offline but cheated for the test using:
image

The issues seems to be the width only. Could you share for reference a screenshot of how it looks like when it works ?

from banana_split.

prybalko avatar prybalko commented on July 27, 2024

Here is how it looks to me.
Chromium 95.0.4638.69 (Official Build) Arch Linux (64-bit)

image

from banana_split.

chevdor avatar chevdor commented on July 27, 2024

ok, so I miss a big chunk.
The canvas on my end is a fixed 30 pixels width which sounds definitely wrong.

from banana_split.

kirushik avatar kirushik commented on July 27, 2024

@chevdor maybe you can test if Brave supports measuring text via DOM (like it is done here), so we can use it as a fallback for measuring it using the canvas API?

from banana_split.

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.