On the page I have added CK Editor at the very bottom , every time the page loads it get focused on the CK Editor. I tried adding
config.startupFocus = false;
on the config.js file, but doesn't seems to be working. I also tried to focus any other element on page load, but since the CK Editor get loaded afterwards it got focused again.
I tried adding event listener on window frames and it doesn't worked either.
window.frames[0].document.addEventListener('load', function() {
document.getElementById('email').focus();
});
Please suggest a way to remove focus from the CK Editor
I dont know a lot about ckeditor but here is what I found on thier doc. You can use the FocusManager .
var focusManager = new CKEDITOR.focusManager( editor );
focusManager.focus();//Focus
focusManager.remove();//Remove focus
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.