[wp-trac] [WordPress Trac] #45053: Customizer throws JS errors when page contains <area> tag without href attribute

WordPress Trac noreply at wordpress.org
Sat Oct 6 05:48:04 UTC 2018


#45053: Customizer throws JS errors when page contains <area> tag  without href
attribute
--------------------------+------------------------------
 Reporter:  janthiel      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+------------------------------
Changes (by dlh):

 * version:  4.9.8 => 4.7


Comment:

 Thanks for the patch, @janthiel, and welcome to Trac!

 It looks like there are a few instances of the `'a[href], area'` selector
 in the preview JS. Would all of those be subject to the same issue?

 I also wonder whether `prepareLinkPreview()` should return early if the
 passed element lacks an `href`?

 Lastly, note that `customize-preview.js` is a generated file. I believe
 you would want to create your patch from the root the develop repository,
 such as https://github.com/WordPress/wordpress-develop, and modify
 `src/js/_enqueues/wp/customize/preview.js`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45053#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list