summaryrefslogtreecommitdiff
path: root/spec/javascripts/shortcuts_issuable_spec.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-01-09 13:50:13 -0600
committerMike Greiling <mike@pixelcog.com>2017-01-10 12:30:45 -0600
commit5ffbb5dee58dcc5541a06a17700c87b62c4c31d8 (patch)
tree64ce61180711f0053baefc223674d486c94a097f /spec/javascripts/shortcuts_issuable_spec.js
parent5f2d1712180b5b56f486b1b2e0888e7acf094451 (diff)
downloadgitlab-ce-5ffbb5dee58dcc5541a06a17700c87b62c4c31d8.tar.gz
bypass buggy "focus" event in Chrome
Diffstat (limited to 'spec/javascripts/shortcuts_issuable_spec.js')
-rw-r--r--spec/javascripts/shortcuts_issuable_spec.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/spec/javascripts/shortcuts_issuable_spec.js b/spec/javascripts/shortcuts_issuable_spec.js
index 7c577cc1b38..3f7f6cf0113 100644
--- a/spec/javascripts/shortcuts_issuable_spec.js
+++ b/spec/javascripts/shortcuts_issuable_spec.js
@@ -50,13 +50,8 @@ require('~/shortcuts_issuable');
return expect(triggered).toBe(true);
});
return it('triggers `focus`', function() {
- var focused;
- focused = false;
- $(this.selector).on('focus', function() {
- return focused = true;
- });
this.shortcut.replyWithSelectedText();
- return expect(focused).toBe(true);
+ expect(document.activeElement).toBe(document.querySelector(this.selector));
});
});
describe('with a one-line selection', function() {