Permalink
Browse files

small fix to force the ColorPicker to close if you're tabbing out of …

…a color input field. currently the behavior is that each individual ColorPicker remains open unless you close it with the mouse.
  • Loading branch information...
1 parent 52eaa34 commit 135143e98ecc47738d8a36677f1f9b10e0ae9574 @cpommiss cpommiss committed May 11, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 javascript/javascript.js
View
3 javascript/javascript.js
@@ -559,6 +559,9 @@ $(document).ready(function () {
//create colorpicker
colorPicker("b[i='s2Hex'], b[i='lHex']", 'hex');
+ //force colorpicker to close when tabbing out of a color input field
+ $("b[i='s2Hex'] input, b[i='lHex'] input").bind("keydown", function(e) { if (e.keyCode == 9) $(this).parent("b").ColorPickerHide(); });
+
//track events via google analytics custom events
$(document).on('click', 'b, #matrixbox', function(event) {
trackEvent( $(this).closest('.rule_wrapper').attr('id') );

0 comments on commit 135143e

Please sign in to comment.