Upon drop, the fix in [1] did consider invisible the blocks that were visible within the current preview mode (mobile/desktop). Because of this `onTargetHide` was be called instead of `onTargetShow`. This commit changes that behavior so that the correct method remains called according to the actual visibility, but the `DeviceVisibility`'s `onTargetShow` is adapted to only add the override if it matches the current preview mode. No steps to reproduce for this first change, but third-party options could have been impacted by it. This commit also adds that condition on the cleanup that was added in [2] to keep the `dataset.invisible` state consistent upon toggling the preview mode. Steps to reproduce this second issue: - Drop a Columns snippet. - Make a column visible only on mobile. - Make another column visible only on desktop. - Toggle preview mode several times. => `dataset.invisible` was set to `1` on all columns having device-dependent visibility. [1]: https://github.com/odoo/odoo/commit/acfca25e48ac9bc227234de860fe8128f0312ed4 [2]: https://github.com/odoo/odoo/commit/174e9fe0d8665d1a81c90a6f7bf5cc9e3361f161 task-3538535 closes odoo/odoo#143640 closes odoo/odoo#143875 Signed-off-by: Arthur Detroux (ard) <ard@odoo.com> Signed-off-by: Benoit Socias (bso) <bso@odoo.com>