Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#22765 closed defect (bug) (fixed)

When inserting an image in Firefox < 17, it is inserted at the top

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 3.5 Priority: highest omg bbq
Severity: blocker Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

Seems to happen in all Firefox versions up to 16.02 and is related to the new media modal.

Attachments (1)

22765.patch (1.1 KB) - added by azaozz 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
11 years ago

  • Owner set to azaozz
  • Status changed from new to assigned

@azaozz
11 years ago

#2 @azaozz
11 years ago

  • Keywords needs-testing added

Seems caused by setting overflow: hidden on the main window when opening the modal. 22765.patch removes that bit.

#3 @azaozz
11 years ago

The problem here is that in Firefox versions less than 17 (currently latest) all images are inserted at the top of the content in the Visual editor, regardless of where the caret is.

So if there are several paragraphs and the user clicks in the last one and inserts an image, it will be inserted in the first paragraph instead. With the above patch it should be inserted where the user has clicked/typed last before opening the modal.

#4 @lessbloat
11 years ago

22765.patch​ works for me. Tested on 16.0.2.

#5 @nacin
11 years ago

  • Keywords has-patch commit added; needs-testing removed

Tested on 16.0.2 as well. Chrome too. Good fix.

#6 @koopersmith
11 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 23085:

Do not alter the body's overflow attribute when the media modal is opened. Fix image insertion in the visual editor in Firefox. props azaozz. fixes #22765.

Note: See TracTickets for help on using tickets.