Giter Site home page Giter Site logo

Comments (14)

david-tejada avatar david-tejada commented on August 11, 2024 1

Will be available in v0.2.0 that I will release soon

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024 1

This is working great!! Thanks heaps

image

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

Inspecting this HTML
image

We can see the whole content editable area is the body of an iframe 😬
image

I don't know how you got iframes working yet and if it would be possible to break out of them to place hints in the main viewport container. I know there are security settings for this but curious for your take on it.

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

This is a weird one 😅. I don't use Jira so I can't test. Would you mind trying to set the attribute readonly to the hints to see if the issue goes away? Maybe you can do it in the devtools to see if it works.

Making it work for iframes was just a matter of setting all_frames to true in the manifest so the content scripts get executed in all frames. Then I store the hints and to which frame it belongs in the background script. It's all a bit more convoluted now because I have to use local storage to support manifest v3. In theory I believe I could move all the hints to the main frame if I also stored the coordinates but it would not be trivial

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

You mean add readonly="true" on individual hints? I did that and they still ended up in the submitted content. :(
It's not a huge deal for me and I understand how much extra complexity this could add, so I am happy if you want to close this.

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

Could you try setting the div container to <div id="rango-hints-container" contenteditable="false" readonly="readonly">?

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

That doesn't change the behaviour either.

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

Ok. Thanks for trying. Let's leave this issue open for now. I'll see if I can come up with something.

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

I'm thinking a possible solution could be not to display hints in frames where the whole body is contenteditable.

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

Oh I like that nice and simple idea! Hopefully that wouldn't cause much confusion or oddness for anyone else.

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

I've tested it in this TinyMCE example page and seems to work nicely.

from rango.

richardmcmillen avatar richardmcmillen commented on August 11, 2024

from rango.

david-tejada avatar david-tejada commented on August 11, 2024

From version 0.3.0 on this issue is not present. The hints are rendered but they will not be submitted or appear if you copy the text. Hints are rendered using shadow dom, what avoids the issue altogether.

from rango.

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.