Changes between Initial Version and Version 1 of Ticket #13377, comment 13
- Timestamp:
- Jul 3, 2015, 7:05:49 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13377, comment 13
initial v1 7 7 In my solution I check ZWS's position in innerHTML of it's parent and write that value as parent's attribute. This way it can't be confused and does not make any impact on actual contents. There is one danger, though. If the contents of ZWS parent changes after we calculate it's position, it may be invalid. My question is if such situation may happen? If so, the method would need some tweaking (see below) but I think this is may be a way to go if we don't want to make workarounds like suppressing events if composition started. 8 8 9 A further tweak may involve saving ZWS in a globally accessible space (like editor instance) so undo manager can read it on it's own and calculate its position after all `beforeUndoImage` events end. This way we achieve t wothings:9 A further tweak may involve saving ZWS in a globally accessible space (like editor instance) so undo manager can read it on it's own and calculate its position after all `beforeUndoImage` events end. This way we achieve three things: 10 10 1. We are guaranteed that editor contents won't change because of other event listeners. 11 11 2. We get rid of events in selection code. 12 3. We don't have to make a mess with another data attribute.