Patch (to be ported)
Project:
Aloha Editor (obsolete)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
11 Oct 2012 at 08:23 UTC
Updated:
20 Nov 2012 at 11:33 UTC
Jump to comment: Most recent file
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 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