Improve element resize detection, Issue #9 part 1