Due to #1859452: Dialog loads default theme CSS breaking admin theme. we're now 'emulating' what is a normal AJAX system request to ensure that the same theme as the parent page is used in the dialog. Really we should attempt to convert the link clicking and the dialog replacement to the ajax system if possible.

We are. But I'm not sure if the problems mentioned in the issue summary/related issue are really resolved now, possibly not. Would be good to confirm.

I didn't see anything break, but would be good to check what kind of additional libraries are loaded when opening the token browser. I guess it will be from the default theme. If that is the case, maybe we can solve it by passing along the theme as a GET argument and implement a theme negotiator to use that theme on that page?

juampynrCreditAttribution: juampynr at Lullabot commented 14 January 2016 at 12:02

We are using use-ajax for the token browser link. As far as I know, there is nothing else that we should do to improve this. While reading the documentation, I saw that it is a good practice to have nojs in the path so the server can respond appropriately. However, when I tested it with JavaScript disabled, I did not see a difference.