Jenkins 2.346.1 scriptApproval page is not showing nicely

After upgrade to 2.346.1 of Jenkins I am seeing this issue of in-process script approval page not displaying nicely. Meaning the code should have been in a textarea nicely unlike the screenshot.

When I first land on this page, by navigating to

Manage Jenkins → In-Process script Approval, it shows it correctly. After I click the button Approve then the format is getting messed up.

I’m not able to duplicate the issue that you’re reporting. Can you provide more details?

I have simple pipeline, that looks like this

SEED = [

SEED.each { seedPath ->
    parameters = [
        stringParam(name: 'SEED_PATH', value: seedPath),
        stringParam(name: 'GERRIT_REFSPEC', value: 'refs/changes/21/123456/3'),
        stringParam(name: 'GERRIT_PROJECT', value: 'my-cicd'),
        stringParam(name: 'RELEASE_FILE_PATH', value: ''),
        stringParam(name: 'GERRIT_BRANCH', value: 'main'),
        stringParam(name: 'GERRIT_HOST', value: ''),

        job: "CICD/SuperSeed",
        wait: true,
        propagate: false,
        parameters: parameters,

This pipeline is calling another job, which take a parameter as input, the path. This will trigger the superseed job. and ask for Approve/Deny in the scriptApproval page, since there are 4 files it will ask for 4 times (Approve or Deny).

Initially when you visit this page (scriptApproval page) everything looks normal and nicely formatted. But, after clicking the FIRST Approve button, the blocks under Approve/Deny buttons gets messed up as showing in my earlier screenshot. But, if you refresh the page everything is back to normal.

However, if you click on second or latter Approve/Deny button’s you won’t see any issues. Only with the First Button it happens.

I had the same issue, I’m working with Active Choices DynamicReferenceParameter with sandbox false.
After playing & modifying with my GroovyScript, the Jenkins Script approval page had multiple Groovy scripts to approve (see pic)

But, once I have pressed Deny on the first Groovy Script, the Script approval page become like that

note: I had to seperate my comments here, because I wasn’t able to upload 2 pics in the same comment