Skip to content

Commit

Permalink
Correct tab order for toolbar filters
Browse files Browse the repository at this point in the history
Resolve Issue qunitjs#1428
Issue qunitjs#1428: Tab order for "Module" and "Filter" items is reversed in toolbar
  • Loading branch information
eddylu94 committed Jan 31, 2020
1 parent 254fccb commit 49ec75f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 11 additions & 2 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,13 +502,22 @@ export function escapeText( s ) {
return moduleFilter;
}

function toolbarFilters() {
var toolbarFilters = document.createElement( "span" );

toolbarFilters.id = "qunit-toolbar-filters";
toolbarFilters.appendChild( toolbarLooseFilter() );
toolbarFilters.appendChild( toolbarModuleFilter() );

return toolbarFilters;
}

function appendToolbar() {
var toolbar = id( "qunit-testrunner-toolbar" );

if ( toolbar ) {
toolbar.appendChild( toolbarUrlConfigContainer() );
toolbar.appendChild( toolbarModuleFilter() );
toolbar.appendChild( toolbarLooseFilter() );
toolbar.appendChild( toolbarFilters() );
toolbar.appendChild( document.createElement( "div" ) ).className = "clearfix";
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/qunit.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@
height: 1.6em;
}

#qunit-toolbar-filters {
float: right;
}

.qunit-url-config,
.qunit-filter,
#qunit-modulefilter {
Expand All @@ -114,7 +118,6 @@

.qunit-filter,
#qunit-modulefilter {
float: right;
position: relative;
margin-left: 1em;
}
Expand Down

0 comments on commit 49ec75f

Please sign in to comment.