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?");
}
