backdrop-contrib / ajax_comments

Convert comment forms to Ajax.
GNU General Public License v2.0
0 stars 1 forks source link

Focus on textarea not working with CKEditor #1

Open laryn opened 4 years ago

laryn commented 4 years ago

It's supposed to give focus to the textarea when clicking "Reply" but it isn't working with Backdrop's CKEditor (if I turn the comment field to plaintext, it works).

laryn commented 4 years ago

From @klonos in Zulip:

it seems that when CKEditor is enabled, the textarea is "replaced" by a .cke_wysiwyg_frame iframe, so ajax_command_invoke()will need to be updated to account for that.

Unfortunately using .cke_wysiwyg_frame (or even .cke_wysiwyg_frame body p does not seem to give focus.

Next problem: I'm also not sure yet how to check whether it's a plain text or WYSIWYG field to determine which ajax_command_invoke() to use, once I figure out the first part.