[wp-trac] [WordPress Trac] #43560: Entering single quotes in Add Media dialog after recropping causes browser to hang

WordPress Trac noreply at wordpress.org
Thu Mar 15 14:46:25 UTC 2018


#43560: Entering single quotes in Add Media dialog after recropping causes browser
to hang
--------------------------------+-----------------------------
 Reporter:  andfinally          |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Media               |    Version:  4.9.4
 Severity:  normal              |   Keywords:
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 '''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.

 '''Notes'''

 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43560>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list