Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38830 closed defect (bug) (fixed)

Customize: Prevent adding edit shortcuts to partial placement containers that cannot contain interactive element children

Reported by: westonruter Owned by: westonruter
Priority: normal Milestone: 4.7
Component: Customize Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In working on #38672 to allow Jetpack to extend Custom CSS to use a pre-processor, the style element in the head is turned into a selective refresh partial placement. Now with #27403 there are edit shortcut buttons that get injected into the container elements for such partial placements. In the case of a style element, however, it is illegal for it to take child elements. Not only can it cause the CSS to no longer render but also the style element is in the head and cannot be displayed anyway, so it makes no sense to inject an edit shortcut.

For more (including a workaround), see ​https://wordpress.slack.com/archives/core-customize/p1479239811000710

Attachments (1)

38830.0.diff​ (1.3 KB ) - added by westonruter 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @westonruter
10 years ago

  • Owner set to westonruter
  • Status new → accepted

#2 @westonruter
10 years ago

List of elements I'm going to explicitly skip adding edit shortcuts into: area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr

@westonruter
10 years ago

#3 @westonruter
10 years ago

  • Keywords has-patch added

#4 @westonruter
10 years ago

  • Resolution → fixed
  • Status accepted → closed

In 39270:

Customize: Prevent edit shortcut buttons from being inserted into container elements in the head or into elements which should not get interactive children.

See #27403, #38672.
Fixes #38830.

Note: See TracTickets for help on using tickets.