Bug 1071514 - [Woodduck][Messages] The picture will flicker once when…

... you take one picture as attachment
one issue we have in Compose is that we rely on the DOM to know which attachments are added. Otherwise they're in a WeakMap but WeakMaps are not iterable.

So we can't currently calculate Compose.size without adding the attachment to the DOM first, and this produces a flickering too.

To change this, we'd need to keep the attachments in a local object, but then we'll need to really take care to clear it properly (with the WeakMap the cleanup is automatic). So I think the scope is too big to be in this bug?