diff options
author | John McLear <john@mclear.co.uk> | 2013-03-14 13:51:23 -0300 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-14 13:51:23 -0300 |
commit | 34c2cf40faae53ef33980378ca7f5e704b91be07 (patch) | |
tree | 86cea7e0aff8230e81c3fe4abcbcd4f2ecbe3efb /tests/frontend/specs/bold.js | |
parent | 12107859bb2325c5ba7b7bf0efeaa76682b5edb7 (diff) | |
download | etherpad-lite-34c2cf40faae53ef33980378ca7f5e704b91be07.zip |
This isn't ideal, basically some browsers interact with keypress/keydown in different ways so this is a workaround but it's not perma
Diffstat (limited to 'tests/frontend/specs/bold.js')
-rw-r--r-- | tests/frontend/specs/bold.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index 010d6901..7c04835e 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,7 +44,13 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - var e = inner$.Event("keypress"); + if(!inner$.browser.chrome){ + var evtType = "keypress"; + }else{ + var evtType = "keydown"; + } + + var e = inner$.Event(evtType); e.ctrlKey = true; // Control key e.which = 66; // b inner$("#innerdocbody").trigger(e); |