add a test to show weird behavior
parent
13ee96dce0
commit
11341eb095
|
@ -24,10 +24,14 @@ describe("As the caret is moved is the UI properly updated?", function(){
|
||||||
// THIS DOESNT WORK AS IT DOESNT MOVE THE CURSOR!
|
// THIS DOESNT WORK AS IT DOESNT MOVE THE CURSOR!
|
||||||
it("down arrow", function(done){
|
it("down arrow", function(done){
|
||||||
var inner$ = helper.padInner$;
|
var inner$ = helper.padInner$;
|
||||||
keyEvent(inner$, 40, false, false); // arrow up
|
var $newFirstTextElement = inner$("div").first();
|
||||||
|
$newFirstTextElement.focus();
|
||||||
|
keyEvent(inner$, 37, false, false); // arrow down
|
||||||
|
keyEvent(inner$, 37, false, false); // arrow down
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
it("Creates N lines", function(done){
|
it("Creates N lines", function(done){
|
||||||
var inner$ = helper.padInner$;
|
var inner$ = helper.padInner$;
|
||||||
var chrome$ = helper.padChrome$;
|
var chrome$ = helper.padChrome$;
|
||||||
|
@ -289,6 +293,7 @@ function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the win
|
||||||
var evtType = "keydown";
|
var evtType = "keydown";
|
||||||
}
|
}
|
||||||
var e = target.Event(evtType);
|
var e = target.Event(evtType);
|
||||||
|
console.log(e);
|
||||||
if(ctrl){
|
if(ctrl){
|
||||||
e.ctrlKey = true; // Control key
|
e.ctrlKey = true; // Control key
|
||||||
}
|
}
|
||||||
|
@ -296,6 +301,7 @@ function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the win
|
||||||
e.shiftKey = true; // Shift Key
|
e.shiftKey = true; // Shift Key
|
||||||
}
|
}
|
||||||
e.which = charCode;
|
e.which = charCode;
|
||||||
|
e.keyCode = charCode;
|
||||||
target("#innerdocbody").trigger(e);
|
target("#innerdocbody").trigger(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue