Inconsistent multi-select behavior

Darren Oh - August 17, 2007 - 17:26
Project:Active Select
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Active Select sets the first option in a target to selected if no default is specified. While this is necessary for activeselect elements to work, it makes the behavior of normal select elements inconsistent: if they are active select targets, an option is selected whether the developer wishes it or not, but if they are not active select targets nothing is selected unless the developer specifies a default.

Where this becomes a problem is when a multi-select list is supposed to show previously selected settings. If one is automatically selected, the list will not be accurate if nothing was previously selected. The attached patch checks to see if an element is an activeselect element before forcing an option to be selected.

AttachmentSize
activeselect.js_.txt768 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.