SwellRT / swellrt

SwellRT main project. Server, JavaScript and Java clients
http://swellrt.org/
Apache License 2.0
234 stars 34 forks source link

Unexpected ITEM_REMOVED and ITEM_ADDED events after string property change #161

Closed atfornes closed 8 years ago

atfornes commented 8 years ago

After changing an string property from a SwellRT collaborative object, the client which is source of the change receives the expected ITEM_CHANGED event, but any other client with that model opened receives an ITEM_CHANGED, followed by a ITEM_REMOVED and ITEM_ADDED of that property

atfornes commented 8 years ago

Another unexpected behavior of this issue is that, unlike when a property is really removed, the ITEM_CHANGED handler is still active.

This is a real problem because the usual way of using event handlers is that when an object is added, a new ITEM_CHANGED is registered. With this fake item removal and addition, an extra ITEM_CHANGED is registered, resulting in as many active item changed handlers as changes happened n the property.