Skip to content

Conversation

@youknowriad
Copy link
Contributor

closes #621

Try inserting an image, a text, a button, a separator.
The editor should scroll to the inserted block properly.

@youknowriad youknowriad added this to the May Week 2 milestone May 10, 2017
@youknowriad youknowriad self-assigned this May 10, 2017
@youknowriad youknowriad requested review from aduth and jasmussen May 10, 2017 11:18
@jasmussen
Copy link
Contributor

Works for me! Nice and simple! 👍 👍

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

From @iseulde's comment at #565 (comment), I thought we might need to try to control TinyMCE's behavior to ensure consistency. But I was finding that this event wasn't being fired. Instead, I think it's just that TinyMCE is also calling focus to the newly initialized content body here:

https://github.com/tinymce/tinymce/blob/8695816/src/core/src/main/js/init/InitContentBody.js#L140

There doesn't seem to be a way to control this and, honestly, I don't think it's going to be terribly disruptive since it seems like it's the Editable and its block wrapper fighting for focus. In either case the user will likely end up where they'd like.

My only concern was whether scroll-by-focus was a browser-specific implementation, but in my brief testing, this appears to behave consistently across Chrome, Safari, Firefox.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inserting a new block should scroll to that block

4 participants