Fix additional document.domain editor edge cases

Refs #17529.

(cherry picked from commit 449ba49201567834201c1e16727ddc95ef35320f)
(cherry picked from commit e63d4a181ff02ed40dc6bbe9c5cca4bf208d4cec)