-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
… Removed is() support since it was turning out to be too much work. It's now it's own ticket (#229). This fixes the IE9/10 issue where the editor was not focused so you could keep typing after switching over to the preview() (through clicking the icons or doing a key command).
- Loading branch information
1 parent
21766af
commit 82051ae
Showing
8 changed files
with
126 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*global createContainer:false, removeContainer:false, rnd:false */ | ||
|
||
describe('.focus()', function () { | ||
var testEl | ||
, id | ||
, editor; | ||
|
||
beforeEach(function () { | ||
id = rnd(); | ||
testEl = createContainer(id); | ||
editor = new EpicEditor({ | ||
basePath: '/epiceditor/', | ||
container: testEl, | ||
focusOnLoad: false | ||
}); | ||
editor.load(); | ||
}); | ||
|
||
afterEach(function () { | ||
editor.removeListener('focus'); | ||
editor.removeListener('blur'); | ||
editor.unload(); | ||
removeContainer(id); | ||
}); | ||
|
||
it('should focus the editor', function () { | ||
document.querySelector('a').focus(); | ||
expect(document.activeElement.nodeName).to.be('A'); | ||
editor.focus(); | ||
// Use .id to compare. A direct obj to obj comparison takes Mocha a long time | ||
expect(document.activeElement.id).to.be(editor.getElement('wrapperIframe').id); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters