Skip to content

Commit

Permalink
Merge pull request paulirish#96 from cpommiss/patch-1
Browse files Browse the repository at this point in the history
Small fix to force the ColorPicker to close if you're tabbing out of a color input field.
  • Loading branch information
uxder committed May 11, 2012
2 parents 52eaa34 + 135143e commit a17855e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') );
Expand Down

0 comments on commit a17855e

Please sign in to comment.