Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix arrows keys moving through edit history #3874

Merged
merged 2 commits into from
Jan 20, 2020

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jan 20, 2020

Different fix that fixes element-hq/element-web#11817
by setting the flag before the callback rather than having the update
method set the flag.

Regressed in #3842
Fixes element-hq/element-web#11917

Different fix that fixes element-hq/element-web#11817
by setting the flag before the callback rather than having the update
method set the flag.

Regressed in #3842
Fixes element-hq/element-web#11917
@dbkr dbkr requested a review from bwindels January 20, 2020 12:22
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

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

1 thing to address, otherwise lgtm. Just to confirm 3 things happen in this PR:

  1. revert Fix timing of when Composer considers itself to be modified #3842 (as discussed in riot web internal, setting the flag in the dom event handlers seems a bit clearer)
  2. add missing this._modifiedFlag = true; when cutting
  3. put the this._modifiedFlag = true; in _insertText (used for adding newlines) before updating the model, to fix the issue originally resolved in Fix timing of when Composer considers itself to be modified #3842

@dbkr
Copy link
Member Author

dbkr commented Jan 20, 2020

Yeah, I originally put it into the cut code path when reverting the patch as it didn't revert cleanly, but it turns out that one came from paste.

@dbkr dbkr requested a review from bwindels January 20, 2020 13:05
@dbkr dbkr merged commit a849826 into develop Jan 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants