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

Put the cursor at the end of content when config.startupFocus = true is set #1399

Closed
KevinYaoooooo opened this issue Jan 4, 2018 · 6 comments
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:feature A feature request.
Milestone

Comments

@KevinYaoooooo
Copy link

KevinYaoooooo commented Jan 4, 2018

Are you reporting a feature request or a bug?

Feature request

Provide detailed reproduction steps (if any)

The config.startupFocus= true; option does not put the cursor at the end of editor content.

Expected result

It should be possible to put the cursor at the end of content if config.startupFocus = true; was set.

Actual result

The cursor is always placed at the start of editor content.

Other details

  • Browser: Any
  • OS: Any
@mlewand
Copy link
Contributor

mlewand commented Jan 4, 2018

There are cases when some would like to put the selection the way it is, so at the beginning of the document.

So instead I see it as a feature request, where it could be customized where the selection should appear. By default it will be at the beginning (backward compatibility), but we should also allow explicitly stating where the selection should land. For your case it would be something like:

// Explicitly tell to put the focus at the end of editable.
config.startupFocus = 'end';

Also I'm changing browser env, as it works the same in all browsers.

@mlewand mlewand added status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:feature A feature request. labels Jan 4, 2018
@mlewand mlewand added this to the Backlog milestone Jan 4, 2018
@mlewand mlewand added the good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. label Jan 4, 2018
@KevinYaoooooo
Copy link
Author

Hi @mlewand ,thanks for answering my question, but I've tried, not working for me.

@mlewand
Copy link
Contributor

mlewand commented Jan 5, 2018

@KevinYaoooooo that's right it won't work for you yet because we have just started developing this feature - so it did not land in any CKEditor release just yet 😉

Please keep an eye on this issue. As it gets into the release we'll set the milestone to a CKEditor version where it lands. From there you will be able to use this feature.

@AnnaTomanek AnnaTomanek changed the title the 'startupFocus:true' does not put the cursor at end of the content Put the cursor at the end of content when config.startupFocus = true is set Jan 5, 2018
@KevinYaoooooo
Copy link
Author

@mlewand , thanks for letting me know, looking forward to that feature and bouch of others, cheers~

@mlewand
Copy link
Contributor

mlewand commented Jan 17, 2018

@KevinYaoooooo This feature has just been positively reviewed and was merged into the master branch, which means it's ready for the release.

If you can't wait for the release you can download a 🔥 burning hot nightly release in "CKEditor Nightly Buyild" section on our Download page. Keep in mind that current nightly has not been verified by our intense integration testing phase, as we do that before the release.

Lastly we just came with a decision to skip minor release and go straight for 4.9.0 release. This means this ticket (and all others) will be incorporated into 4.9.0 release, see our milestones page for a release schedule.

@KevinYaoooooo
Copy link
Author

Thanks @mlewand, you guys are awesome

@mlewand mlewand modified the milestones: 4.8.1, 4.9.0 Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:feature A feature request.
Projects
None yet
Development

No branches or pull requests

3 participants