ViewUtils seems like an odd place to put this, since the other code in here is so oriented around managing scrolling panels (mainly the sidebar).  But short of creating a new DOMUtils module, there doesn't seem to be any better option.  So we might as well leave it here for now...