Closed ghost closed 1 year ago
The original commit fixed the issue even though not ideal -- notes in code on a better fix.
I'm not sure if this is the right issue and/or if I should open a new one: In contrast to the D7 module, in the Backdrop version there are unnecessary and therefore disturbing elements in the References Dialog's node form. See the highlighted area in the screenshot below. Is it possible to suppress the .l-header
element within the iframe somehow? I'm also interested in a workaround.
The original commit fixed the issue even though not ideal -- notes in code on a better fix.
@herbdool In my understanding the issue is not fixed but I'm not sure what you meant by "fixed ... even though not ideal". Is the screenshot above expected behavior?
Guess I've found the related core issue: https://github.com/backdrop/backdrop-issues/issues/1728
It has even a PR, updated by @klonos in Sep 2019!
@olafgrabienski I don't recall anything about this anymore. Not whether it's fixed nor what is supposed to look like.
There already is a way to suppress the surrounding layout with class="use-ajax" data-dialog="true"
as attributes for a link. But it has bugs. See https://github.com/backdrop/backdrop-issues/issues/5250
Thanks for your feedback, @herbdool and @indigoxela ! In the meantime, I've tested the PR for the related core issue. It fixes the issue for me in combination with uncommenting one line in references_dialog.module.
So, as soon as the core issue is fixed, let's make the needed change in References Dialog.
I think the better approach would be to adapt this module to use what @indigoxela mentions: class="use-ajax" data-dialog="true"
. I did a quick test to confirm it should work, but needs some work to ensure the behaviour matches.
@herbdool I'm fine with every approach, couldn't tell their advantages and disadvantages. Why do you think class="use-ajax" data-dialog="true"
is better?
Maybe @robertgarrigos wants to share his thoughts regarding iframe vs. use-ajax?
Also interesting:
[References Dialog] contains interesting sample code on how to use jquery dialog for an iframed content (which solves complications and issues encountered when using plain forms with Dialog API)
https://github.com/backdrop-ops/contrib/issues/138#issue-135093161
A possible solution (small change) has been posted in this comment: https://github.com/backdrop/backdrop-issues/issues/1728#issuecomment-926423499
Sorry @indigoxela I don't have either a clear position on which option would be best.
I think we're just waiting for a core PR to be merged then this module can call the new function to suppress the layout.
I think we're just waiting for a core PR to be merged
It got merged, but only in 1.21.0, which means, it will be part of the minor release in January.
A possible solution (small change) has been posted in this comment: backdrop/backdrop-issues#1728 (comment)
Does this apply any more? I applied that change locally and couldn't see any effect.
Dialogs as shown with full default layout, due to change in layout selection in 1.3.4 see #1491