[inputFocus/tests] fix test compatibility in IE
This commit is contained in:
parent
e3f0479d76
commit
2c5fae89c8
|
@ -9,7 +9,6 @@ define(function (require) {
|
|||
var inputValue = 'Input Text Value';
|
||||
|
||||
beforeEach(module('kibana'));
|
||||
|
||||
beforeEach(inject(function (_$compile_, _$rootScope_, _$timeout_) {
|
||||
$compile = _$compile_;
|
||||
$rootScope = _$rootScope_;
|
||||
|
@ -31,7 +30,10 @@ define(function (require) {
|
|||
$rootScope.$digest();
|
||||
$timeout.flush();
|
||||
selectedEl = document.activeElement;
|
||||
selectedText = window.getSelection().toString();
|
||||
selectedText = selectedEl.value.slice(
|
||||
selectedEl.selectionStart,
|
||||
selectedEl.selectionEnd
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,4 +50,4 @@ define(function (require) {
|
|||
expect(selectedText).to.equal(inputValue);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue