Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "trailing hacks" in more scenarios. #122

Merged
merged 7 commits into from
Mar 17, 2024

Commits on Mar 15, 2024

  1. Configuration menu
    Copy the full SHA
    ff0c846 View commit details
    Browse the repository at this point in the history
  2. Add "trailing hacks" in more scenarios.

    Browsers have very particular opinions about where they will allow
    users to place selections in contenteditable elements. ProseMirror
    manages this in part by placing <br> elements in locations that
    browsers otherwise wouldn't allow user selections.
    
    This PR brings react-prosemirror closer to matching all of the
    situations that ProseMirror itself uses these "trailing hacks". Rather
    than only in empty textblocks, we now also place trailing hacks when
    a textblock node ends with a non-text node, a widget, or a text node
    that ends with a newline.
    smoores-dev committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    602029d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8719c0b View commit details
    Browse the repository at this point in the history
  4. Remove dist files again

    smoores-dev committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    24c43c9 View commit details
    Browse the repository at this point in the history
  5. Add ProseMirror view's "separator hack".

    Safari and Chrome both have cursor drawing/selection bugs that
    prevent users from making selections after non-contenteditable
    inline nodes in some situations. To work around this, in these
    browsers, we add an empty image element between the trailing non-
    contenteditable node and the "trailing hack", which allows users
    to place cursors there.
    smoores-dev committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    db1e891 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9bbf41f View commit details
    Browse the repository at this point in the history
  7. Remove dist files again

    smoores-dev committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    bdf9dbb View commit details
    Browse the repository at this point in the history