Currently, if neither #ajax['method'] nor a 'method' property on an Insert command returned by an Ajax response are explicitly set, the default method used is replaceWith which replaces the wrapper. Should we change this to html, so as not to replace the wrapper?

Next steps would be to add comments to this issue with pros/cons of wrapper replacement.


Crell’s picture

Yes we should. Key reason: The wrapper may have all kinds of classes or IDs or data-* or RDF attributes on it that I don't know or care about for ajax purposes. I shouldn't have to figure them out and replicate them just to replace the wrapper with what is already there.

Potential downside: we'd need to ensure that the text we're replacing doesn't have the wrapper in it. Like most things in Drupal I suspect we're horribly inconsistent on this front.

Crell’s picture

Issue summary: View changes

grammar fix

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.