Coder Social home page Coder Social logo

Comments (3)

MayurSMahajan avatar MayurSMahajan commented on June 26, 2024 1

I can take a look at this one, but if something is priority, I request the team to handle it due to my time constraints.

from appflowy.

Xazin avatar Xazin commented on June 26, 2024

Since this was originally implemented by you @MayurSMahajan , I wonder if you want to also work on improvements and bug fixes for inline document search?

from appflowy.

MayurSMahajan avatar MayurSMahajan commented on June 26, 2024

Hey @Xazin,
So after observing this issue, I have noticed two things:

  1. For scroll freeze: There is a jumpTo() method call which causes the editor to shift all content down and get frozen there.
  2. For selected text getting replaced after pressing enter: This only happens when the focus is not on the Find Text Input field. Thus the Enter key event causes the editor to replace the selected text, rather than navigating to the next match.

I have solved the first part of the issue by removing the jumpTo() call, since anyway making a new selection causes the editor to scroll to the selected content. I will create a PR for this in the AppFlowyEditor repo.

I need some help tackling the second part.
Approach 1: I tried implementing Shortcuts, Actions, and Intent to listen to the Enter key event on the FindReplace widget to kind of intercept the Enter key event before it is handled by the Editor itself, which as expected, deletes the selected content. But I am not able to do it.
Approach 2: I wrapped the FindReplace widget with KeyboardEventListener, this too causes the editor to take over and insert a newline after handling the onKeyEvent.

Can you give me a hint for deciding a strategy towards stopping the editor from deleting the content?
Anyway, I will continue brainstorming, just updating everyone on the current progress of the issue.

from appflowy.

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.