Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
i use Aloha editor in Commons. When i open a Node(any content with a comment field) the cursor jumps automatically to comment. By a long Body field its a big problem, cause the user have to scroll up.
Thanks for the help.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1809620-5.patch | 1.12 KB | Wim Leers |
Comments
Comment #1
Wim LeersThanks for your feedback! :)
This is work-around for an AE bug. I can only get the AE UI to become visible at all when the corresponding editable is *active*. And it only becomes active by giving it focus.
See http://drupalcode.org/project/aloha.git/blob/90dca286131a31e3231b913bd3d....
Once #1789240: Ensure Aloha Editor UI can be *always* present, not only when actively editing ("static toolbar", prevents flashing) is solved, we won't need to "activate" it anymore, and then we won't have this problem anymore.
Not marking this as a duplicate though because I'm sure others will report this as well :)
Comment #2
Laz5530 CreditAttribution: Laz5530 commentedThank you for the answere.
I think i have a solution to evade this "jumping".
I have outcommented the line: Aloha.jQuery('#' + id).focus().trigger('mousedown').trigger('mouseup');
So now the Aloha-Editor-Line appears just if i click on the text Field, but it doesnt jump.
I think this is how it should work, because if i want to edit something, then i will click there for sure :)
Now it looks like:
...
Aloha.getEditableById(id).activate();
// This hack will trigger the floating menu to appear *immediately*.
//Aloha.jQuery('#' + id).focus().trigger('mousedown').trigger('mouseup');
},
...
Comment #3
quicksketchI also agree that we should remove this hack that gives the first editor focus. I understand the reason for making the toolbar visible on the first editor, but the hack to make it appear is worse than the original problem of it not being visible.
Comment #4
Wim LeersFair enough :) Will fix this tomorrow.
Comment #5
Wim LeersAttached patch fixes it.
Comment #6
Wim LeersThe first change in the patch prevents Aloha from working well in Edit. It's something that will be fixed by #1789240: Ensure Aloha Editor UI can be *always* present, not only when actively editing ("static toolbar", prevents flashing).
I kept the second change, which is the *actual* fix for this problem anyway.
http://drupalcode.org/project/aloha.git/commit/634432c