1 | | And yes... now everything makes sense. As I mentioned in comment:1, using editable.attachListeners was helping for attaching a listener to document on second and following contentDom events. It did, because then those custom listeners are removed, so new one for the same event and function can be added. If removeAllListeners were correctly removing also custom listeners besides removing only native listeners, then there would be no need for using attachListeners, because after document.removeAllListeners done on editable.detach() everything would be reset to initial state. |
| 1 | And yes... now everything makes sense. As I mentioned in comment:1, using editable.attachListeners was helping for attaching a listener to document on second and following contentDom events. It did, because in this case those custom listeners are automatically removed on editable detaching, so new one for the same event and function can be added. If removeAllListeners were correctly removing also custom listeners besides removing only native listeners, then there would be no need for using attachListeners, because after document.removeAllListeners done on editable.detach() everything would be reset to initial state. |