Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The preview window currently opens as a new window. There is no good reason why it shouldn't open in modal. If we do this we need to make it configurable.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2784055-preview-modal-8.patch | 5.31 KB | bleen |
|
Comments
Comment #2
bleen CreditAttribution: bleen at NBCUniversal commentedEverything about this patch works except that when the href of the preview link is changed dynamically it doesn't seem to get registered by the ajax logic that opens the modal. Help welcome ...
see https://drupal.stackexchange.com/questions/259566/dynamically-changing-t...
Comment #3
bleen CreditAttribution: bleen at NBCUniversal commentedthis is a reminder to myself to look at this stackexchange answer more carefully: https://drupal.stackexchange.com/a/229328/63043
Comment #4
bleen CreditAttribution: bleen at NBCUniversal commentedSinging else to look at: https://www.drupal.org/project/ctools/issues/2627306#comment-11888471
Comment #5
bleen CreditAttribution: bleen at NBCUniversal commentedalmost certainly related: #2764931: Contextual links don't work with 'use-ajax' links
Comment #6
bleen CreditAttribution: bleen at NBCUniversal commentedEureka!!
This patch works. I would like to do some cleanup and I'm still deciding if this should really be optional or not.
Comment #7
bleen CreditAttribution: bleen at NBCUniversal commentedI think this is ready to be reviewed
Comment #8
bleen CreditAttribution: bleen at NBCUniversal commentedDoh!!! I think _this_ is ready to be reviewed
Comment #11
bleen CreditAttribution: bleen at NBCUniversal commentedI never got a good review, but I think this is a good change. I leave it in dev for a while and people can report any issues
Comment #13
esod CreditAttribution: esod at Memorial Sloan Kettering Cancer Center commentedPatch #8 works well for us on 8.x-1.0-beta6.
Comment #14
effulgentsia CreditAttribution: effulgentsia at Acquia commentedThe change from a separate browser tab/window to a modal was a good step! Thanks for that.
However, an image field widget can already itself be in a modal (for example within the media library), and modals within modals is problematic. See #3098235: Preview Modal Conflicts with Media Library Modal for ideas/discussion on fixing that.
Comment #15
smurfxx CreditAttribution: smurfxx commentedCan you please convert this patch for Drupal 7 version?