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

Error: Failed to execute focus - on chrome v64 #391

Open
mchabou opened this issue Feb 14, 2018 · 3 comments
Open

Error: Failed to execute focus - on chrome v64 #391

mchabou opened this issue Feb 14, 2018 · 3 comments

Comments

@mchabou
Copy link

mchabou commented Feb 14, 2018

Hello,
We have a bug with chrome browser v64.0 when we click on buttons "insert link" or "insert image" :
bootstrap-wysihtml5.min.js Uncaught TypeError: Failed to execute 'focus' on 'HTMLElement': parameter 1 ('options') is not an object.

capture du 2018-02-14 16-22-38
capture du 2018-02-14 16-24-14

To fix temporarily this, we had to make the following changes at lines 279 and 341

if (!activeButton) {
    self.editor.currentView.element.focus();    // instead of ...element.focus(false);
    caretBookmark = self.editor.composer.selection.getBookmark();

Can you do the necessary to fix this bug.

thank you

mchabou

@lsarni
Copy link

lsarni commented Feb 14, 2018

I created an issue #390 but when we updated to the latest version and this was fixed.
We use this gem bootstrap-wysihtml5-rails and upgraded from 0.3.1.23 to 0.3.3.8.

@michalmarek-sk
Copy link

Hi guys, I patched it by inserting empty object instead of boolean value.
self.editor.currentView.element.focus({});

@MasterAlchemist
Copy link

MasterAlchemist commented Apr 18, 2018

@michalmarek-sk Thank you very much! It solved my problem! :)

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

No branches or pull requests

4 participants