Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #31308 from wilsonpage/1191671
Browse files Browse the repository at this point in the history
Bug 1191671 - clearing previous search in rocketbar should not dismiss keyboard
  • Loading branch information
wilsonpage committed Aug 19, 2015
2 parents 8f77edf + fd6e170 commit fa32b80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/system/js/rocketbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
this.handleCancel(e);
} else if (e.target == this.clearBtn) {
this.clear();
this.focus();
} else if (e.target == this.backdrop) {
this._closeSearch();
}
Expand Down
2 changes: 2 additions & 0 deletions apps/system/test/unit/rocketbar_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,12 @@ suite('system/Rocketbar', function() {
test('handleEvent() - click clear button', function() {
var setInputStub = this.sinon.stub(subject, 'setInput');
var hideResultsStub = this.sinon.stub(subject, 'hideResults');
var focusStub = this.sinon.stub(subject, 'focus');
var event = {type: 'click', target: subject.clearBtn};
subject.handleEvent(event);
assert.ok(setInputStub.calledWith(''));
assert.ok(hideResultsStub.calledOnce);
assert.ok(focusStub.calledOnce);
});

test('handleEvent() - click backdrop', function() {
Expand Down

0 comments on commit fa32b80

Please sign in to comment.