WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#18989 closed defect (bug) (fixed)

Inserting images with Press This not working

Reported by: ronbme Owned by: azaozz
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Press This Keywords: needs-testing has-patch
Focuses: Cc:

Description

Using WP 3.3 trunk 18977

Inserting an image with Press This bookmarklet is not working. List of images are shown but after selecting the image and clicking "insert image", nothing happens.

Also, after highlighting everything in an article and using Press This, everything was copied, except the image.

Tried both Visual and Html editors. Didn't work in either one.

Attachments (1)

18989_fix.patch (819 bytes) - added by olleicua 2 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 ocean902 years ago

  • Cc azaozz added
  • Keywords needs-patch added; image Press This removed
  • Milestone changed from Awaiting Review to 3.3

comment:2 duck_2 years ago

Caused by [18570] which added the #photo-add-url-div div element to the Press This screen. This contains and input with ID "this_photo":

<input type="text" id="this_photo" name="this_photo" class="tbtitle text" onkeypress="if(event.keyCode==13) image_selector();" />

this interferes with the image_selector() JavaScript when used for the input return by the photo_thumnail AJAX so that:

src = jQuery('#this_photo').val();

returns an empty string as it's retrieving #this_photo from #photo-add-url-div instead from the thickbox.

olleicua2 years ago

comment:3 olleicua2 years ago

  • Cc olleicua@… added

Fixed it by using a more specific jquery selector.

comment:4 olleicua2 years ago

  • Keywords needs-testing added; needs-patch removed

comment:5 SergeyBiryukov2 years ago

  • Keywords has-patch added

comment:6 azaozz2 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In [19381]:

Press This: fix duplicate HTML IDs, add the 'default_post_to_edit' ID, fix minor RTL css, fixes #18989

Note: See TracTickets for help on using tickets.