* (bug 10642) Fix shift-click checkbox behavior for Opera 9.0+ and 6.0
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 19 Jul 2007 15:33:12 +0000 (15:33 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 19 Jul 2007 15:33:12 +0000 (15:33 +0000)
commit9154cb1539e90e1fd92fda56f9add377035310a7
tree6b666669705e4e3a831e1054d7e17020938e25f1
parentfd157f2967fc9cc6baec8853e46c4654312e7adf
* (bug 10642) Fix shift-click checkbox behavior for Opera 9.0+ and 6.0

The previous code was using the 'onmouseup' event to trigger the shift-click multiple selection behavior. This had a number of problems:
* Opera 6.0 doesn't fire this event on radio buttons
* Opera 7.x and 8.x flip the check state before sending the event, while Opera 9.x and other browsers flip it after
* A UA check for Opera was used to work around the state inconsistency for 7.x and 8.x, which broke on 9.x
* Minor quibble: the event fires if you click outside the radio and release while the mouse is over it, though that wouldn't normally count as a click on the radio.

I've switched it to use the 'onclick' event handler instead, which resolves this:
* Opera 6.x fires this event
* All tested browsers have flipped the check state before the event, so special-case code can be removed.

Tested browsers:
* Opera 9.2, 9.0, 8.5, 8.0, 7.5, 6.0/Mac
* Firefox 2/Mac
* Safari 2/Mac
* Safari 3/Win
* IE 7/Win
* IE 6/Win
* IE 5.2/Mac
* iCab 3/Mac
* Mozilla 1.1/Mac
RELEASE-NOTES
includes/DefaultSettings.php
skins/common/wikibits.js