[wp-trac] [WordPress Trac] #35832: Paste action in text field/area context menu in theme customizer leaves Save&Publish button disabled (Firefox)

WordPress Trac noreply at wordpress.org
Sat Mar 5 01:02:51 UTC 2016


#35832: Paste action in text field/area context menu in theme customizer leaves
Save&Publish button disabled (Firefox)
--------------------------+---------------------------------------------
 Reporter:  xkr47         |       Owner:
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.5
Component:  Customize     |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  ui, javascript, administration
--------------------------+---------------------------------------------
Changes (by westonruter):

 * keywords:  has-patch => needs-patch
 * owner:  westonruter =>
 * status:  accepted => assigned


Comment:

 Perhaps this is out of scope for this ticket, but there is also an
 opportunity to reduce an extra needless Ajax request for changes to widget
 inputs. When an `input` event happens on a field in a widget, all of the
 named form fields get submitted to the server for sanitization to obtain a
 hmac-verified PHP-serialized string which is then passed to the preview
 for rendering (this is done so that the user cannot submit arbitrary
 serialized PHP data, since serialized data is a security vulnerability).
 But at the moment an `update-widget` Ajax request is made for each `input`
 event and ''also'' when a `change` event happens. So this usually means
 that there are at least two Ajax requests made for each change to a field.
 Ideally the `change` event could be circumvented if it sees that an
 `input` event already sent data to the server that matches what is the
 current value of the field when `change` is triggered.

 See also #33507 which would allow us to get rid of the `update-widget`
 Ajax request and dealing with serialized data.

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


More information about the wp-trac mailing list