Skip to main content
Participating Frequently
September 27, 2025

ScriptUI Dropdown Lists Reset after onChange Function in versions 25.4 and v25.5....

  • September 27, 2025
  • 2 replies
  • 102 views

Hello,

 

I think I found a scripting bug with ScriptUI dropdown lists in After Effects 25.4 and 25.5. When an item is selected from a dropdown list and triggers an onChange function, the code executes, but the dropdown list resets, as if nothing was selected. In After Effects 25.3.2 and before, this works as expected.

 

Here’s how I tested it:

  • To make sure it wasn't complex code causing the issue, I created a simple script with a ScriptUI palette that has two dropdown lists. The left dropdown does nothing when selected. The right dropdown executes an onChange function and shows an alert.
  • When selecting an item from the left dropdown, the new selection holds. When selecting an item from the right dropdown, the alert appears correctly. Clicking “Ok” closes the alert, but it reappears immediately, and the selection in the right dropdown is cleared.
  • I tested the same script in After Effects versions 24.6.8, 25.3.2 and 25.4. It works in 24.6.8 and 25.3.2, but fails in 25.4.

 

It's almost as if the item is getting selected twice in rapid succession, and it clears out the dropdown list selection in the process.

 

I attached a screen recording of what is happening and pasted the test script code underneath my system specs below.

Thanks in advance for your help.

 

Here us my system info:

MacBook Pro - 14-inch, 2023

Apple M2 Pro

16 GB Ram

macOS Sequoia 15.6.1

After Effects Version 25.5.0 (Build 4)

 

 

 

var panelGlobal = this;


var dialog = (panelGlobal instanceof Panel) ? panelGlobal : new Window("palette"); 
    if ( !(panelGlobal instanceof Panel) ) dialog.text = "Dialog"; 
    dialog.orientation = "row"; 
    dialog.alignChildren = ["center","top"]; 
    dialog.spacing = 10; 
    dialog.margins = 16; 

var dropdown1_array = ["Item 1","Item 2","Item 3"]; 
var dropdown1 = dialog.add("dropdownlist", undefined, undefined, {name: "dropdown1", items: dropdown1_array}); 
    dropdown1.selection = 0; 

var dropdown2_array = ["Item 1","Item 2","Item 3"]; 
var dropdown2 = dialog.add("dropdownlist", undefined, undefined, {name: "dropdown2", items: dropdown2_array}); 
    dropdown2.selection = 0; 

dialog.layout.layout(true);
dialog.layout.resize();
dialog.onResizing = dialog.onResize = function () { this.layout.resize(); }

if ( dialog instanceof Window ) dialog.show();

dropdown2.onChange =  function(){
	alert("Dropdown 2 - TEST!!\nDoes the list clear after clicking OK?");
}

 

2 replies

Inspiring
October 11, 2025

Hi

 

I can verify I have the same problem, which means my plugin no longer works in AE 25.4. The dropdown is broken. Please Adobe fix this immediately. I have this very simple code example and after the onChange function, the dropdown will change to NULL/no selection.

 

(function me(thisObj) {
    function buildUI(thisObj) {
        var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Dropdown Example", undefined, {resizeable:true});

        // UI elements
        var dropdown = myPanel.add("dropdownlist", undefined, ["Option A", "Option B", "Option C"]);
        dropdown.selection = 0; // Default selection

        // Event listener
        dropdown.onChange = function() {
            alert("You selected: " + dropdown.selection.text);
        };

        // Layout
        myPanel.layout.layout(true);
        myPanel.layout.resize();
        return myPanel;
    }

    var myScriptPanel = buildUI(thisObj);

    if (myScriptPanel instanceof Window) {
        myScriptPanel.center();
        myScriptPanel.show();
    }
})(this);

 

Thanks,

Jakob

Participating Frequently
September 28, 2025

Hello again,

 

I did a bit more digging and still do not have a solution, but narrowed down the issue. It appears that the dropdown list resets itself when the onChange function affects something outside the palette, like triggering an alert or changing something in After Effects. However, it works correctly when the onChange function affects the palette itself, like checking a box.

 

At the bottom of the post, I pasted the code for an updated script that demonstrates the issue. It has 3 dropdown lists:

  • One does nothing.
  • The second triggers an alert, which behaves incorrectly and resets itself when it shouldn’t.
  • The third checks/unchecks boxes and behaves correctly.

 

Hopefully someone from Adobe can replicate the issue and confirm it's a bug.

 

Thank you.

 

var panelGlobal = this;

// DIALOG
// ======
var dialog = (panelGlobal instanceof Panel) ? panelGlobal : new Window("palette"); 
    if ( !(panelGlobal instanceof Panel) ) dialog.text = "Dropdown Test"; 
    dialog.orientation = "row"; 
    dialog.alignChildren = ["center","top"]; 
    dialog.spacing = 10; 
    dialog.margins = 16; 

// PANEL_DONOTHING
// ===============
var panel_DoNothing = dialog.add("panel", undefined, undefined, {name: "panel_DoNothing"}); 
    panel_DoNothing.text = "Do Nothing"; 
    panel_DoNothing.orientation = "column"; 
    panel_DoNothing.alignChildren = ["left","top"]; 
    panel_DoNothing.spacing = 10; 
    panel_DoNothing.margins = 10; 

var dd_DoNothing_array = ["Item 1","Item 2","Item 3"]; 
var dd_DoNothing = panel_DoNothing.add("dropdownlist", undefined, undefined, {name: "dd_DoNothing", items: dd_DoNothing_array}); 
    dd_DoNothing.selection = 0; 

// PANEL_ALERT
// ===========
var panel_Alert = dialog.add("panel", undefined, undefined, {name: "panel_Alert"}); 
    panel_Alert.text = "Alert"; 
    panel_Alert.orientation = "column"; 
    panel_Alert.alignChildren = ["left","top"]; 
    panel_Alert.spacing = 10; 
    panel_Alert.margins = 10; 

var dd_Alert_array = ["Item 1","Item 2","Item 3"]; 
var dd_Alert = panel_Alert.add("dropdownlist", undefined, undefined, {name: "dd_Alert", items: dd_Alert_array}); 
    dd_Alert.selection = 0; 

// PANEL_CHECKBOX
// ==============
var panel_Checkbox = dialog.add("panel", undefined, undefined, {name: "panel_Checkbox"}); 
    panel_Checkbox.text = "Check boxes"; 
    panel_Checkbox.orientation = "column"; 
    panel_Checkbox.alignChildren = ["center","top"]; 
    panel_Checkbox.spacing = 10; 
    panel_Checkbox.margins = 10; 

// GRP_CHECKBOXES
// ==============
var grp_Checkboxes = panel_Checkbox.add("group", undefined, {name: "grp_Checkboxes"}); 
    grp_Checkboxes.orientation = "row"; 
    grp_Checkboxes.alignChildren = ["left","center"]; 
    grp_Checkboxes.spacing = 17; 
    grp_Checkboxes.margins = 0; 

var checkbox1 = grp_Checkboxes.add("checkbox", undefined, undefined, {name: "checkbox1"}); 
    checkbox1.text = "1"; 

var checkbox2 = grp_Checkboxes.add("checkbox", undefined, undefined, {name: "checkbox2"}); 
    checkbox2.text = "2"; 

var checkbox3 = grp_Checkboxes.add("checkbox", undefined, undefined, {name: "checkbox3"}); 
    checkbox3.text = "3";

var dd_Checkboxes_array = ["Box 1","Box 2","Box 3"]; 
var dd_Checkboxes = panel_Checkbox.add("dropdownlist", undefined, undefined, {name: "dd_Checkboxes", items: dd_Checkboxes_array}); 
    dd_Checkboxes.selection = 0;

dialog.layout.layout(true);
dialog.layout.resize();
dialog.onResizing = dialog.onResize = function () { this.layout.resize(); }

if ( dialog instanceof Window ) dialog.show();


//Test dropdown list by showing alert
dd_Alert.onChange = function () {

    alert("Dropdown 2 - TEST!!\nDoes the list clear after clicking OK?");

}

//Test dropdown list by checking/unchecking boxes in palette
dd_Checkboxes.onChange = function () {

    var listNum = dd_Checkboxes.selection.index;
    switch(listNum){

        case 0:
            (checkbox1.value) ? checkbox1.value = false : checkbox1.value = true;
        break;

        case 1:
            (checkbox2.value) ? checkbox2.value = false : checkbox2.value = true;
        break;

        case 2:
            (checkbox3.value) ? checkbox3.value = false : checkbox3.value = true;
        break;
    }

}