Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Fix updating editor when editing selected text #1512

Closed

Conversation

existentialism
Copy link
Contributor

@existentialism existentialism commented Nov 16, 2017

Fixes #1509.

Ref: #719

@jackyho112 jackyho112 requested review from flarnie and removed request for flarnie November 16, 2017 23:22
Copy link
Contributor

@jackyho112 jackyho112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@mitermayer
Copy link
Contributor

Thanks for this! @existentialism do you think you could also add a test for it ? :)

@mitermayer mitermayer self-requested a review November 17, 2017 06:21
Copy link
Contributor

@mitermayer mitermayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a test

@mitermayer
Copy link
Contributor

adding this PR to my list of PR's to test/import

@bradbirnbaum
Copy link

I'm bumping into this issue - any ETA on when this will be published? Thanks for your hard work!

@existentialism
Copy link
Contributor Author

@mitermayer sorry for delay, in the midst of preppin' for turkey day :) will try to get a test(s) written asap!

@juliankrispel
Copy link
Contributor

Thanks for fixing this! Looks like like this is good to merge @mitermayer?

@sontek
Copy link

sontek commented Dec 28, 2017

Any chance this can get merged + release? This is causing us issues in prod :)

@juliankrispel
Copy link
Contributor

@sontek @existentialism this will get merged and releaed evtl. but just fyi the release process is a lot slower in this repository due to necessity.

If you want to use it now, fork from this commit and use that until it's merged. Sry for the inconvenience, it's just that with a repository this much used it's hard to move fast :(

Copy link
Contributor

@flarnie flarnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Will get it merged and release a minor version asap.

happy_sloth

isBackward: false,
};

//const collapsedSelection = new SelectionState(DEFAULT_SELECTION);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we mean to remove this?


const newEditorState = editor.update.mock.calls[0][0];
expect(newEditorState.getCurrentContent()).toMatchSnapshot();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hooray~ Great tests!

tests_pass

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flarnie is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flarnie has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@existentialism
Copy link
Contributor Author

@flarnie @mitermayer thanks!

@existentialism existentialism deleted the issue1509 branch January 10, 2018 15:06
@JLarky
Copy link

JLarky commented Feb 20, 2018

I think this issue is still not solved.

Text I use abc now If I select a and I type a it may or may not work depending on how I selected the character: from left to right or from right to left (but mouse or keyboard doesn't matter). Good thing that it's no longer crashes 👍, but behavior is still wrong.

Can see this bug on both my website and https://draftjs.org/

@existentialism
Copy link
Contributor Author

existentialism commented Feb 20, 2018

@JLarky ill take a look

EDIT: Pushed #1661

alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
Fixes #1509.

Ref: facebookarchive/draft-js#719
Closes facebookarchive/draft-js#1512

Differential Revision: D6673593

fbshipit-source-id: fb5ab4c41de7958139deb125e5e8e79c76b53ec3
aforismesen added a commit to aforismesen/draft-js that referenced this pull request Jul 12, 2024
Summary:
Fixes #1509.

Ref: facebookarchive/draft-js#719
Closes facebookarchive/draft-js#1512

Differential Revision: D6673593

fbshipit-source-id: fb5ab4c41de7958139deb125e5e8e79c76b53ec3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants