Closed (fixed)
Project:
Form API Multiselect element
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2011 at 07:40 UTC
Updated:
16 May 2013 at 17:54 UTC
In the module folder open fapi_multiselect.js and in the click functions starting on line 84 change them to the following:
$wrapper.find('ul li a:eq(0)').click(function(event) {
event.preventDefault();
$leftSelect.moveSelectionTo($rightSelect);
updateMainSelect();
});
// Moves selection if remove is clicked to selected box
$wrapper.find('ul li a:eq(1)').click(function(event) {
event.preventDefault();
$rightSelect.moveSelectionTo($leftSelect);
updateMainSelect();
});
This will prevent the default action on the click on the "a" tag.
Thanks
James
Comments
Comment #1
szadok commented+1
Like the suggestion
Comment #2
ryan.merritt commentedExcellent suggestion, took a minute of looking at it to understand as well, thank you :)
Comment #3
thehong commentedCommited. Thanks.
Comment #4
thehong commentedComment #6
WorldFallz commentedfyi this commit caused an error. The commit left out 'event' from
.click(function(event))both calls. Patch attached in #1863284: js error: event is not defined.Comment #6.0
WorldFallz commentedadded code tags