Skip to content

Conversation

@jleandroperez
Copy link
Contributor

Details:

iOS 11's insertText / deleteBackward's inner workings result into loosing the typingAttributes. This fix is analog to the one introduced via #725.

Fixes #749

cc @diegoreymendez
Thanks in advance!

To test:

  1. Verify that the unit tests pass
  2. Launch Aztec > Empty document
  3. Toggle Bold
  4. Type Here + Newline
  5. Toggle Italics
  6. Type Theree + Backspace twice
  7. Type e
  8. Verify that the new e character is in italics.

@jleandroperez jleandroperez added this to the Beta 12 (next stable) milestone Oct 5, 2017
@jleandroperez jleandroperez self-assigned this Oct 5, 2017
Copy link
Contributor

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

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

The PR is mostly fine with one exception. Try this:

  1. Apply any header style
  2. Type something
  3. Press ENTER once
  4. Type "1"
  5. Backspace once.

PROBLEM: The header style is applied to the second line.

To do:

We should add a unit test for this scenario.
We should check if the care is at the beginning of the paragraph:

  • If the care is at the beginning of a paragraph, we should only copy regular (non-paragraph) styles.
  • If the care is anywhere else, we should copy all styles.

@jleandroperez
Copy link
Contributor Author

jleandroperez commented Oct 9, 2017

@diegoreymendez nice catch!. The scenario outlined has it's own issue (#747), and it's own PR though (#754). Would you like me to merge that PR in here?

Edited:
This ^^ is actually inaccurate, the scenario outlined by Diego is different. Addressing here!

Copy link
Contributor

@diegoreymendez diegoreymendez left a comment

Choose a reason for hiding this comment

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

This is a golden PR. Nice changes!

@diegoreymendez diegoreymendez merged commit b776ce7 into develop Oct 9, 2017
@diegoreymendez
Copy link
Contributor

Need this PR in to test the following PR in line. We have several, so I'm overriding Circle for now.

We'll be letting Circle run for the last PR, so that all of the changes are checked.

@jleandroperez
Copy link
Contributor Author

Thanks for the review Diego!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loosing Style after hitting Backspace

3 participants