I managed to reproduce an annoying bug pointed by some of our users.
I used Firefox 3.6.13 to make it happen.
First, open the Aloha Documents example.
Put your cursor at the end of a paragraph, press enter and type a word.
Select that word, make it become a heading 1 via the floating menu, put your cursor at the end of the heading 1 and press enter.
The new line is now a heading 1 instead of a simple paragraph.
Do you have some ideas where this bug could come from ?
This has something to do with either the selection (how aloha editor reads the current selection) or the code which handles pressing enter.
I will modify both in near future, because it does not use the dom utility methods for dom manipulation right now, so I will recheck whether this bug still persists after I changed this.
This also affects http://getsatisfaction.com/aloha_editor/topics/how_to_avoid_enter_behaviour
I can still reproduce this in 0.10 (even after merging all refactorings into 0.10).
I will inspect this further...
fix #66 - Fixed detection of pressing enter at end of a Heading: do n…
…ot consider Elements with class 'aloha-cleanme' (they are just inserted to overcome some browser rendering issues)