Giter VIP home page Giter VIP logo

Comments (13)

jsamr avatar jsamr commented on June 21, 2024 1

@maicolsantos I realize you're from Fortaleza, aren't you? I've just moved from France to Juazeiro do Norte, what a coincidence!

from plugins.

maicolsantos avatar maicolsantos commented on June 21, 2024 1

@jsamr I sent you an email. 🤓

from plugins.

maicolsantos avatar maicolsantos commented on June 21, 2024

the following code snippet works to me, for now.
I'm waiting for an official fix.

alterChildren={(node) => {
  if (node.name === 'table') {
    node.attribs._rawHtml = node.attribs._rawHtml.replace(/border="\d+"/g, '')
  }
}

from plugins.

jsamr avatar jsamr commented on June 21, 2024

@thijs-qv @maicolsantos This is likely a box-sizing issue.

Can you try to add a CSS rule for the table element as such, and tell me if the issue disappear?

table {
  box-sizing: border-box;
}

from plugins.

thijs-qv avatar thijs-qv commented on June 21, 2024

I've added the rule to css-rules.js, but the issue still persists.

from plugins.

jsamr avatar jsamr commented on June 21, 2024

OK. Please provide me a minimal reproducible example (ideally, a git), and I'll be happy to investigate.

from plugins.

thijs-qv avatar thijs-qv commented on June 21, 2024

I've placed a simple example here.
Would be great if you can take a look.

from plugins.

jsamr avatar jsamr commented on June 21, 2024

@thijs-qv @maicolsantos This is my understanding of the issue so far:

  1. The border table attribute is a legacy from old HTML specs, and is not part of the HTML 5 standard anymore.
  2. The border table attribute is ignored when my script computes table's height because it uses, for best browser support, the scrollHeight.

I could probably just add the style's borderWidth value to the scrollHeight and it should fix the problem, if and only if browser engines transfer the legacy border property to the style object, which you will have to confirm.

I will publish pre-release patches that you can test, until the issue is resolved. Will keep you updated.

from plugins.

thijs-qv avatar thijs-qv commented on June 21, 2024

Thanks for looking into it. I'm not sure if adding the borderWidth to the scrollHeight will solve the issue. The border attribute specifies if a border should be displayed around the table cells or not. So it's not just the table that gets a border, but the cells as well.

from plugins.

jsamr avatar jsamr commented on June 21, 2024

@thijs-qv I don't think that is an issue because inner borders will be taken into account in scrollHeight. It did work on your MWE. Please test again with 0.5.1-rc.0, and let me know :-)

from plugins.

thijs-qv avatar thijs-qv commented on June 21, 2024

@jsamr You are correct, that is not an issue, it's working well now. Thank you / merci beaucoup!

from plugins.

jsamr avatar jsamr commented on June 21, 2024

@thijs-qv You're very welcomed!

from plugins.

maicolsantos avatar maicolsantos commented on June 21, 2024

@jsamr it's working well now. Thank you 🤓

from plugins.

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.