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

Fix typo in editOnBeforeInput #1584

Conversation

flarnie
Copy link
Contributor

@flarnie flarnie commented Dec 19, 2017

what is the change?:
We were calling this.update when there was no update method on
this. It should be editor.update.

This fix is not really complete in the first place, but I'll make any
follow-up changes in a new PR.

why make this change?:
This is causing an error to be thrown - see internal FB task t24443952

test plan:
I manually reproduce the bug before the fix -
screen shot 2017-12-19 at 7 14 07 am

and then was not able to reproduce with the same steps after the fix.

To reproduce -

  • open the 'plaintext' example and type 'hello'
  • select the 'o' with a forwards selection, left to right
  • type 'o'. This was throwing, now it's not.

**what is the change?:**
We were calling `this.update` when there was no `update` method on
`this`. It should be `editor.update`.

This fix is not really complete in the first place, but I'll make any
follow-up changes in a new PR.

**why make this change?:**
This is causing an error to be thrown - see internal FB task t24443952

**test plan:**
I manually reproduce the bug before the fix -
(Flarnie will insert screenshot)

and then was not able to reproduce with the same steps after the fix.

To reproduce -
- open the 'plaintext' example and type 'hello'
- select the 'o' with a forwards selection, left to right
- type 'o'. This was throwing, now it's not.

**issue:**
internal task t24443952
@existentialism
Copy link
Contributor

@flarnie you can close #1512 if this gets landed as well!

@mitermayer
Copy link
Contributor

Lets merge #1512 instead of this one :)

@flarnie
Copy link
Contributor Author

flarnie commented Jan 8, 2018

Closing in favor of #1512 - thanks @mitermayer and @existentialism

@flarnie flarnie closed this Jan 8, 2018
facebook-github-bot referenced this pull request Nov 5, 2019
…und (#2242)

Summary:
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.5.1.
<details>
<summary>Changelog</summary>

*Sourced from [handlebars's changelog](https://github.com/wycats/handlebars.js/blob/v4.5.1/release-notes.md).*

> ## v4.5.1 - October 29th, 2019
> Bugfixs
>
> - fix: move "eslint-plugin-compat" to devDependencies - 5e9d17f ([https://github.com/facebook/draft-js/issues/1589](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1589))
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
>
> [Commits](handlebars-lang/handlebars.js@v4.5.0...v4.5.1)
>
> ## v4.5.0 - October 28th, 2019
> Features / Improvements
> - Add method Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584)) - 62ed3c2
> - add guard to if & unless helpers ([https://github.com/facebook/draft-js/issues/1549](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1549))
> - show source location for the strict lookup exceptions - feb60f8
>
> Bugfixes:
> - Use objects for hash value tracking - 7fcf9d2
>
> Chore:
> - Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586)) - 7052e88
> - chore: add eslint-plugin-compat and eslint-plugin-es5 - 088e618
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.5...v4.5.0)
>
> ## v4.4.5 - October 20th, 2019
> Bugfixes:
>
> - Contents of raw-blocks must be matched with non-eager regex-matching - 8d5530e, [https://github.com/facebook/draft-js/issues/1579](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1579)
>
>
>
> [Commits](handlebars-lang/handlebars.js@v4.4.4...v4.4.5)
>
> ## v4.4.4 - October 20th, 2019
> Bugfixes:
> - fix: prevent zero length tokens in raw-blocks ([https://github.com/facebook/draft-js/issues/1577](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1577), [https://github.com/facebook/draft-js/issues/1578](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1578)) - f1752fe
>
> Chore:
> - chore: link to s3 bucket with https, add "npm ci" to build instructions - 0b593bf
>
> Compatibility notes:
> - no compatibility issues are expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.3...v4.4.4)
>
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`7ef8617`](handlebars-lang/handlebars.js@7ef8617) v4.5.1
- [`b75e3e1`](handlebars-lang/handlebars.js@b75e3e1) Update release notes
- [`5e9d17f`](handlebars-lang/handlebars.js@5e9d17f) fix: move "eslint-plugin-compat" to devDependencies
- [`b24797d`](handlebars-lang/handlebars.js@b24797d) v4.5.0
- [`a243067`](handlebars-lang/handlebars.js@a243067) Update release notes
- [`088e618`](handlebars-lang/handlebars.js@088e618) chore: add eslint-plugin-compat and eslint-plugin-es5
- [`7052e88`](handlebars-lang/handlebars.js@7052e88) Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586))
- [`b8913fc`](handlebars-lang/handlebars.js@b8913fc) Add missing types for the Exception class properties ([https://github.com/facebook/draft-js/issues/1583](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1583))
- [`62ed3c2`](handlebars-lang/handlebars.js@62ed3c2) Add Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584))
- [`7fcf9d2`](handlebars-lang/handlebars.js@7fcf9d2) Use objects for hash value tracking
- Additional commits viewable in [compare view](handlebars-lang/handlebars.js@v4.1.1...v4.5.1)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=handlebars&package-manager=npm_and_yarn&previous-version=4.1.1&new-version=4.5.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/draft-js/network/alerts).

</details>
Pull Request resolved: #2242

Differential Revision: D18314832

Pulled By: mrkev

fbshipit-source-id: a021417222e0eddabc7816eeb0468f2c91ace9d9
mmissey referenced this pull request in mmissey/draft-js Mar 24, 2020
…und (facebookarchive#2242)

Summary:
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.5.1.
<details>
<summary>Changelog</summary>

*Sourced from [handlebars's changelog](https://github.com/wycats/handlebars.js/blob/v4.5.1/release-notes.md).*

> ## v4.5.1 - October 29th, 2019
> Bugfixs
>
> - fix: move "eslint-plugin-compat" to devDependencies - 5e9d17f ([https://github.com/facebook/draft-js/issues/1589](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1589))
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
>
> [Commits](handlebars-lang/handlebars.js@v4.5.0...v4.5.1)
>
> ## v4.5.0 - October 28th, 2019
> Features / Improvements
> - Add method Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584)) - 62ed3c2
> - add guard to if & unless helpers ([https://github.com/facebook/draft-js/issues/1549](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1549))
> - show source location for the strict lookup exceptions - feb60f8
>
> Bugfixes:
> - Use objects for hash value tracking - 7fcf9d2
>
> Chore:
> - Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586)) - 7052e88
> - chore: add eslint-plugin-compat and eslint-plugin-es5 - 088e618
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.5...v4.5.0)
>
> ## v4.4.5 - October 20th, 2019
> Bugfixes:
>
> - Contents of raw-blocks must be matched with non-eager regex-matching - 8d5530e, [https://github.com/facebook/draft-js/issues/1579](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1579)
>
>
>
> [Commits](handlebars-lang/handlebars.js@v4.4.4...v4.4.5)
>
> ## v4.4.4 - October 20th, 2019
> Bugfixes:
> - fix: prevent zero length tokens in raw-blocks ([https://github.com/facebook/draft-js/issues/1577](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1577), [https://github.com/facebook/draft-js/issues/1578](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1578)) - f1752fe
>
> Chore:
> - chore: link to s3 bucket with https, add "npm ci" to build instructions - 0b593bf
>
> Compatibility notes:
> - no compatibility issues are expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.3...v4.4.4)
>
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`7ef8617`](handlebars-lang/handlebars.js@7ef8617) v4.5.1
- [`b75e3e1`](handlebars-lang/handlebars.js@b75e3e1) Update release notes
- [`5e9d17f`](handlebars-lang/handlebars.js@5e9d17f) fix: move "eslint-plugin-compat" to devDependencies
- [`b24797d`](handlebars-lang/handlebars.js@b24797d) v4.5.0
- [`a243067`](handlebars-lang/handlebars.js@a243067) Update release notes
- [`088e618`](handlebars-lang/handlebars.js@088e618) chore: add eslint-plugin-compat and eslint-plugin-es5
- [`7052e88`](handlebars-lang/handlebars.js@7052e88) Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586))
- [`b8913fc`](handlebars-lang/handlebars.js@b8913fc) Add missing types for the Exception class properties ([https://github.com/facebook/draft-js/issues/1583](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1583))
- [`62ed3c2`](handlebars-lang/handlebars.js@62ed3c2) Add Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584))
- [`7fcf9d2`](handlebars-lang/handlebars.js@7fcf9d2) Use objects for hash value tracking
- Additional commits viewable in [compare view](handlebars-lang/handlebars.js@v4.1.1...v4.5.1)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=handlebars&package-manager=npm_and_yarn&previous-version=4.1.1&new-version=4.5.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/draft-js/network/alerts).

</details>
Pull Request resolved: facebookarchive#2242

Differential Revision: D18314832

Pulled By: mrkev

fbshipit-source-id: a021417222e0eddabc7816eeb0468f2c91ace9d9
vilemj-Viclick referenced this pull request in kontent-ai/draft-js Jul 16, 2020
…und (facebookarchive#2242)

Summary:
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.5.1.
<details>
<summary>Changelog</summary>

*Sourced from [handlebars's changelog](https://github.com/wycats/handlebars.js/blob/v4.5.1/release-notes.md).*

> ## v4.5.1 - October 29th, 2019
> Bugfixs
>
> - fix: move "eslint-plugin-compat" to devDependencies - 5e9d17f ([https://github.com/facebook/draft-js/issues/1589](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1589))
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
>
> [Commits](handlebars-lang/handlebars.js@v4.5.0...v4.5.1)
>
> ## v4.5.0 - October 28th, 2019
> Features / Improvements
> - Add method Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584)) - 62ed3c2
> - add guard to if & unless helpers ([https://github.com/facebook/draft-js/issues/1549](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1549))
> - show source location for the strict lookup exceptions - feb60f8
>
> Bugfixes:
> - Use objects for hash value tracking - 7fcf9d2
>
> Chore:
> - Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586)) - 7052e88
> - chore: add eslint-plugin-compat and eslint-plugin-es5 - 088e618
>
> Compatibility notes:
> - No compatibility issues are to be expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.5...v4.5.0)
>
> ## v4.4.5 - October 20th, 2019
> Bugfixes:
>
> - Contents of raw-blocks must be matched with non-eager regex-matching - 8d5530e, [https://github.com/facebook/draft-js/issues/1579](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1579)
>
>
>
> [Commits](handlebars-lang/handlebars.js@v4.4.4...v4.4.5)
>
> ## v4.4.4 - October 20th, 2019
> Bugfixes:
> - fix: prevent zero length tokens in raw-blocks ([https://github.com/facebook/draft-js/issues/1577](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1577), [https://github.com/facebook/draft-js/issues/1578](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1578)) - f1752fe
>
> Chore:
> - chore: link to s3 bucket with https, add "npm ci" to build instructions - 0b593bf
>
> Compatibility notes:
> - no compatibility issues are expected
>
> [Commits](handlebars-lang/handlebars.js@v4.4.3...v4.4.4)
>
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`7ef8617`](handlebars-lang/handlebars.js@7ef8617) v4.5.1
- [`b75e3e1`](handlebars-lang/handlebars.js@b75e3e1) Update release notes
- [`5e9d17f`](handlebars-lang/handlebars.js@5e9d17f) fix: move "eslint-plugin-compat" to devDependencies
- [`b24797d`](handlebars-lang/handlebars.js@b24797d) v4.5.0
- [`a243067`](handlebars-lang/handlebars.js@a243067) Update release notes
- [`088e618`](handlebars-lang/handlebars.js@088e618) chore: add eslint-plugin-compat and eslint-plugin-es5
- [`7052e88`](handlebars-lang/handlebars.js@7052e88) Resolve deprecation warning message from eslint while running eslint ([https://github.com/facebook/draft-js/issues/1586](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1586))
- [`b8913fc`](handlebars-lang/handlebars.js@b8913fc) Add missing types for the Exception class properties ([https://github.com/facebook/draft-js/issues/1583](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1583))
- [`62ed3c2`](handlebars-lang/handlebars.js@62ed3c2) Add Handlebars.parseWithoutProcessing ([https://github.com/facebook/draft-js/issues/1584](https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1584))
- [`7fcf9d2`](handlebars-lang/handlebars.js@7fcf9d2) Use objects for hash value tracking
- Additional commits viewable in [compare view](handlebars-lang/handlebars.js@v4.1.1...v4.5.1)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=handlebars&package-manager=npm_and_yarn&previous-version=4.1.1&new-version=4.5.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/draft-js/network/alerts).

</details>
Pull Request resolved: facebookarchive#2242

Differential Revision: D18314832

Pulled By: mrkev

fbshipit-source-id: a021417222e0eddabc7816eeb0468f2c91ace9d9
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.

4 participants