[FIX] web: revert c1d48362d3a38606ffb99d569fdc6147dcd0c775 and consider there is a previous dialog only if isDestroyed returns False