Git Product home page Git Product logo

Comments (5)

fenekku avatar fenekku commented on August 29, 2024 2

I didn't understand the browser part: Firefox 127.0.2 (not to be confused with localhost) on Linux.

That was a reference to his version of Firefox. The version number 127.0.2 looks like a local network IP of the 127.0.X.Y variety.

If you type out a long comment 255 chars+ (much longer than just "asdfgadfs" and no new lines). Do you get the same behaviour?

from invenio-app-rdm.

Samk13 avatar Samk13 commented on August 29, 2024 1

I didn't understand the browser part: Firefox 127.0.2 (not to be confused with localhost) on Linux. However, I tested it on both Chrome and Firefox, and it seems like I am unable to reproduce the issue with the timer.

However, as you can see in SR, when pressing enter, the new line appears at the top. When placing the cursor at the end, it jumps to the top, and this doesn't seem to be related to the timer.

A temporary workaround is to paste the text as is from another source, or click on "Insert Code," write your text, cut it, and then paste it back.

  • code text highlighting is lost when clicking save.

Testing on Linux: Pop_OS.
cursor-test-2

from invenio-app-rdm.

max-moser avatar max-moser commented on August 29, 2024

Potentially related: 5s refresh interval for requests

from invenio-app-rdm.

Samk13 avatar Samk13 commented on August 29, 2024

Got it now Firefox version 127.0.2, not your local IP! 😅

Okay, Using Firefox 127.0 (released on June 11, 2024) and Chrome 126.0.6478.126 (not to be confused with my IP address ;) as the issue is browser-agnostic, I tested with a long comment (255+ characters, single line).

The cursor only jumps when pressing enter, as I mentioned earlier.
I've also noticed that it loses focus randomly, as seen in the SR when clicking and pressing space rapidly also not related to the timer.
cursor-2

Any ideas on the cause @fenekku ?

from invenio-app-rdm.

fenekku avatar fenekku commented on August 29, 2024

The cursor only jumps when pressing enter, as I mentioned earlier.
I've also noticed that it loses focus randomly, as seen in the SR when clicking and pressing space rapidly also not related to the timer.

Ugh... I am still thinking it has to do with the textarea being re-rendered by React. It's a known problem that the cursor position will be lost in those situations unless kept in the state or using a Ref (:stuck_out_tongue_closed_eyes: ). If it's not (only) the 5s timer causing re-renders, but perhaps other events that would explain it. I am working on something else so perhaps a React expert could chime in.

from invenio-app-rdm.

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.