selection: don't compute range if edit area is empty of elements

fixRangeOverflow() would call some `rangy` functions with a null element,
even causing the wysithml5 constructor to fail.