Make WordPress Core

Ticket #30155: 30155.diff

File 30155.diff, 706 bytes (added by adamsilverstein, 8 years ago)
  • src/wp-admin/js/image-edit.js

    diff --git src/wp-admin/js/image-edit.js src/wp-admin/js/image-edit.js
    index 0d8eaf081f..3a10c96cd0 100644
     
    579579                }
    580580
    581581                this.initCrop(postid, img, parent);
    582                 this.setCropSelection(postid, 0);
     582                this.setCropSelection(postid, { 'x1': 0, 'y1': 0, 'width': img[0].width, 'height': img[0].height } );
     583
    583584                this.toggleEditor(postid, 0);
    584585                // Editor is ready, move focus to the first focusable element.
    585586                $( '.imgedit-wrap .imgedit-help-toggle' ).eq( 0 ).focus();
     587                        this.iasapi.setSelection(0, 0, img[0].width, img[0].height + 1, true);
     588                        this.iasapi.setOptions({ show: true });
     589                        this.iasapi.update();
    586590        },
    587591
    588592        /**