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

Writing Flow: Pressing enter while within inline boundary forces caret position to revert #8877

Closed
aduth opened this issue Aug 11, 2018 · 5 comments
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Aug 11, 2018

To Reproduce

  1. Navigate to Posts > Add New
  2. Click writing prompt
  3. Press Cmd+B (Ctrl+B) to start bolding text
  4. Type a few characters
  5. Press Enter
  6. Type a few characters
  7. Observe caret is forced back into first paragraph unexpectedly

Expected behavior

Typing at Step 6 should occur within the second paragraph.

@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Aug 11, 2018
@aduth aduth added this to the 3.6 milestone Aug 11, 2018
@aduth aduth self-assigned this Aug 11, 2018
@aduth
Copy link
Member Author

aduth commented Aug 11, 2018

This appears to be largely an issue caused by lingering TinyMCE DOM state left in the first paragraph which can incur the forced subsequent re-focus (e.g. #_mce_caret, the ZWSP inline boundary character).

@spocke Do you have any recommendations for how we can either reset the TInyMCE DOM state when focus leaves the editor? Or prevent it from incurring future forced focus grabs? I think this might be related to tinymce/tinymce#4472 with the ZWSP placement (trimming the ZWSP on blur fixes the issue). I'll plan to continue debugging this Monday.

@aduth
Copy link
Member Author

aduth commented Aug 11, 2018

WIP PR: #8879

@designsimply
Copy link
Member

Possibly related: #8114, #8387

@youknowriad youknowriad modified the milestones: 3.6, 3.7 Aug 16, 2018
@youknowriad youknowriad modified the milestones: 3.7, 3.8 Aug 30, 2018
@ellatrix
Copy link
Member

This issue seems to be resolved, most likely after #11595. Could you confirm?

@ellatrix
Copy link
Member

Seems fixed, because the live DOM is now continuously in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended
Projects
None yet
4 participants