Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8634120

Browse files
committed
test(ngAria): test fix for spacebar being blocked
1 parent e5f08f5 commit 8634120

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/ngAria/ariaSpec.js

+10
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,16 @@ describe('$aria', function() {
11291129
});
11301130
});
11311131

1132+
describe('contenteditable space', function() {
1133+
it('should add a space when spacebar is pressed', function() {
1134+
scope.someAction = jasmine.createSpy('someAction');
1135+
compileElement('<section ng-click="someAction()"><div contenteditable="true">space</div></section>');
1136+
var divElement = element.find('div');
1137+
divElement.triggerHandler({type: 'keypress', keyCode: 32});
1138+
expect(divElement.text()).toBe('space ');
1139+
});
1140+
});
1141+
11321142
// Helpers
11331143
function compileElement(inputHtml) {
11341144
element = $compile(inputHtml)(scope);

0 commit comments

Comments
 (0)