From 51695f82c8c0017d3853b36bdadec5c8253648fb Mon Sep 17 00:00:00 2001 From: dblood Date: Thu, 2 Dec 2010 14:23:41 -0800 Subject: Datepicker: enabled OSX meta keys to work when constraining input. Fixed #5317 - datepicker cmd+a/c/v is not working on MAC OS-X --- ui/jquery.ui.datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/jquery.ui.datepicker.js') diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 519b8a913..abcb37067 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -565,7 +565,7 @@ $.extend(Datepicker.prototype, { if ($.datepicker._get(inst, 'constrainInput')) { var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')); var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode); - return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); + return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); } }, -- cgit v1.2.3