Giter Club home page Giter Club logo

Comments (7)

nathanfaucett avatar nathanfaucett commented on July 23, 2024 1

@hardyjosh I am not sure of a way to fix this in this library, I have tried writing something that removes the text nodes in the content editable elements, but it breaks the compiled svelte code, so unless this can be fixed in the svelte compiler, I'm not sure I know of a way to fix this issue for FireFox

from svelte-slate.

nathanfaucett avatar nathanfaucett commented on July 23, 2024

@luan on firefox the extra text nodes that svelte adds is causing this issue, there is some discussion around whitespace handling in svelte here sveltejs/svelte#3080, not sure how I want to handle this issue yet, because I cant just remove the nodes cuz it breaks sveltes rendering

from svelte-slate.

DataDaoDe avatar DataDaoDe commented on July 23, 2024

@nathanfaucett It looks like they are resolving this now with a preprocessor, not really sure if they actually have a solution that works for our use case here though, see: sveltejs/svelte#189

from svelte-slate.

hardyjosh avatar hardyjosh commented on July 23, 2024

@nathanfaucett any more thoughts on this issue? this package is so great and works perfectly on chrome etc, the firefox issue is such a shame.

@DataDaoDe i tried adding the preprocessor replace in sveltejs/svelte#189 but it didn't help unfortunately.

from svelte-slate.

hardyjosh avatar hardyjosh commented on July 23, 2024

@nathanfaucett no worries, I tried a few quick things also but you're right.

Why are the extra text nodes such an issue in this case and not always? Is it because it's content-editable and the css is pre-wrap?

from svelte-slate.

nathanfaucett avatar nathanfaucett commented on July 23, 2024

@hardyjosh its only when its content-editable from what i can tell, now the css pre-wrap i have not tried anything with yet

from svelte-slate.

hardyjosh avatar hardyjosh commented on July 23, 2024

@nathanfaucett I tried some other css but then you lose the intentional whitespace too. Although maybe there's some way to make it work.

from svelte-slate.

Related Issues (6)

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.