Closed FWennerdahl closed 6 years ago
It appears to be an issue on the Angular implementation, not related to #2283.
I have the same issue.
Also when I set focus manually with $('selector').froalaEditor('events.focus');
the editor does get focus, but the froalaEditor.focus
event is not triggered. This could explain why the froalaEditor.blur
event is also not triggered once I click outside the editor.
Tested and works. Thanks!
Expected behavior.
When using the initOnClick functionality, the editor should gain focus when clicked like it does when not using AngularJS.
Actual behavior.
When using the angular-froala bindings, the editor does not get focused when initializing on click.
Steps to reproduce the problem.
JSFiddle angular-froala: https://jsfiddle.net/Lty2xz7e/ JSFiddle vanilla Froala: https://jsfiddle.net/2h5aeoz2/
Repeating the same steps with the vanilla Froala JSFiddle above, the editor does get focus when initialized and the blur event is triggered when clicking somewhere else.
Use-case: We're using the blur event to destroy and reinitialize the editors to avoid having more than one active editor at a time on the same page. Since the editor doesn't get focus the event isn't triggered and multiple instances can be opened at the same time.
OS.
macOS 10.12.6 Sierra
Browser.
Chrome 62.0.3202.94