BL-482: Image dialog scroll bar not working correctly

Do not merge this request, it is just for review.