Make WordPress Core

Opened 21 months ago

Last modified 12 months ago

#43560 new defect (bug)

Entering single quotes in Add Media dialog after recropping causes browser to hang

Reported by: andfinally Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.4
Component: Media Keywords:
Focuses: ui, administration Cc:
PR Number:


To reproduce

  • Create a draft and insert an image into the content.
  • In the Visual editor, click on the image to get the tooltip image edit menu, then on the pencil icon to edit the image.
  • In the Image Details dialog click the "Edit Original" button to edit the image.
  • In the Edit Image dialog, click and drag on the image to create a cropping zone.
  • Click the crop icon in top left above the image to crop it.
  • Click the "Save" button below the image to save the crop.
  • Back on the Image Details dialog, try to enter several single quotes in the Alternative Text input. Tap your single quote key six or seven times.

What I expect to see

  • I am able to continue entering text in the image dialog inputs, even if I'm prevented from entering a single quote.

What I see instead

  • I am unable to enter any text in any of the dialog's inputs.
  • In most cases the page seems to lock for some time - I'm unable to interact with it at all: I can't refresh or close it normally. The Chrome task manager shows 101% CPU usage for the tab.
  • There are no JS errors in the console, and no requests in the network tab.
  • On some occasions, after leaving the page for several minutes, it eventually unlocks by itself, and some of the characters I typed in my earlier attempt to enter text are output wherever I happen to have my cursor.


It looks like some piece of JS is somehow capturing the keypresses in the Alternative Text input.

This was reproduced in macOS and Windows Chrome 64 and macOS Chromium 62 (the Chromium with no browser extensions) on a fresh checkout of WordPress v4.9.4. It doesn't happen in FF55.

Change History (3)

#1 @anamoresby
21 months ago


After several tests following a VIP client report, we have found that this issue happens both in Mac and Windows, but only under a Chrome browser and after image cropping. Also, we've been able to reproduce it in a non-dotcom site to ensure it is a core issue.

Hope this info is useful!

#2 @andfinally
21 months ago

Thanks @anamoresby it is useful!

#3 @antonioromano
12 months ago

Hi guys,
any plan to deploy a patch for this with one of the next wp core releases?


Note: See TracTickets for help on using tickets.