fix gallery media dialog paging bug
Merge branch 'refs/heads/master' into 2.1