Giter Club home page Giter Club logo

Comments (5)

sanketj avatar sanketj commented on May 24, 2024 1

The use cases for some of these attributes (ex. spellcheck, writingsuggestions, translate) inheriting across shadow boundaries seem more compelling than for contenteditable, so I'm not sure if aligning with contenteditable's behavior for all of them is the right choice.

Could you also share more context into why the choice was made to disallow contenteditable from inheriting across shadow boundaries?

from html.

smaug---- avatar smaug---- commented on May 24, 2024

So Firefox follows the current spec - root element in shadow DOM doesn't have a parent element.

What would be the use case to inherit?

from html.

sanketj avatar sanketj commented on May 24, 2024

This was discussed during a WHATNOT call in the context of #9065. One use case for inheritance is to allow authors to turn off spellcheck for the whole document by setting the attribute to false on the document element. As currently spec'ed, if authors want to also turn off the feature in shadow trees, they would have to explicitly set the spellcheck attribute inside each shadow tree. If inheritance worked across shadow boundaries, they would be able to realize this intent more simply.

from html.

sanketj avatar sanketj commented on May 24, 2024

@smaug---- @emilio If we were to update the spec to allow inheritance across shadow boundaries, would Firefox be able to adopt that behavior?

from html.

annevk avatar annevk commented on May 24, 2024

Based on https://searchfox.org/wubkat/commit/6e1c9b06a562ecfc8363f93f0eb36d9bcd8f2631 this seems like a 13yo bug.

As @rniwa pointed out to me not inheriting contenteditable across tree boundaries was a deliberate choice. These attributes should follow that. I suggest we add tests for spellcheck and get this fixed.

from html.

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.