Fix bug in gallery edit_item with sliding image