Merge pull request #1507 from ether/ace2_inner-fix
fix issue where opera was doing stupid things but still an issue w/ doub...
This commit is contained in:
commit
760bebc429
|
@ -3561,6 +3561,11 @@ function Ace2Inner(){
|
||||||
var isModKey = ((!charCode) && ((type == "keyup") || (type == "keydown")) && (keyCode == 16 || keyCode == 17 || keyCode == 18 || keyCode == 20 || keyCode == 224 || keyCode == 91));
|
var isModKey = ((!charCode) && ((type == "keyup") || (type == "keydown")) && (keyCode == 16 || keyCode == 17 || keyCode == 18 || keyCode == 20 || keyCode == 224 || keyCode == 91));
|
||||||
if (isModKey) return;
|
if (isModKey) return;
|
||||||
|
|
||||||
|
// If the key is a keypress and the browser is opera and the key is enter, do nothign at all as this fires twice.
|
||||||
|
if (keyCode == 13 && browser.opera && (type == "keypress")){
|
||||||
|
return; // This stops double enters in Opera but double Tabs still show on single tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
|
||||||
|
}
|
||||||
|
|
||||||
var specialHandled = false;
|
var specialHandled = false;
|
||||||
var isTypeForSpecialKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
var isTypeForSpecialKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
||||||
var isTypeForCmdKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
var isTypeForCmdKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
||||||
|
@ -4651,10 +4656,7 @@ function Ace2Inner(){
|
||||||
function bindTheEventHandlers()
|
function bindTheEventHandlers()
|
||||||
{
|
{
|
||||||
$(document).on("keydown", handleKeyEvent);
|
$(document).on("keydown", handleKeyEvent);
|
||||||
// Hack for Opera to stop it firing twice on events
|
$(document).on("keypress", handleKeyEvent);
|
||||||
if ($.browser.opera){
|
|
||||||
$(document).on("keypress", handleKeyEvent);
|
|
||||||
}
|
|
||||||
$(document).on("keyup", handleKeyEvent);
|
$(document).on("keyup", handleKeyEvent);
|
||||||
$(document).on("click", handleClick);
|
$(document).on("click", handleClick);
|
||||||
$(root).on("blur", handleBlur);
|
$(root).on("blur", handleBlur);
|
||||||
|
|
Loading…
Reference in New Issue