Skip to content

Commit

Permalink
Simplified / improved focus handling. Fixes selectize#75, selectize#126
Browse files Browse the repository at this point in the history
…, …
  • Loading branch information
brianreavis committed Sep 24, 2013
1 parent e21856b commit 7f450db
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 73 deletions.
8 changes: 6 additions & 2 deletions examples/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,15 @@ input[type=button]:hover {
}

@media only screen and (max-width : 320px) {
body {
margin: 20px 0;
}
#wrapper {
margin: 0;
}
h1 {
margin: 20px;
#wrapper > * {
padding-left: 10px;
padding-right: 10px;
}
.demo {
padding: 20px;
Expand Down
2 changes: 1 addition & 1 deletion src/less/selectize.bootstrap2.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
&.dropdown-active::before {
display: none;
}
&.focus, &.focus:hover {
&.input-active, &.input-active:hover, .selectize-control.multi &.focus {
background: @selectize-color-input !important;
border-color: rgba(82,168,236,.8) !important;
outline: 0 !important;
Expand Down
4 changes: 2 additions & 2 deletions src/less/selectize.less
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
-webkit-font-smoothing: @selectize-font-smoothing;
}

.selectize-input, .selectize-control.single .selectize-input.focus {
.selectize-input, .selectize-control.single .selectize-input.input-active {
background: @selectize-color-input;
cursor: text;
display: inline-block;
Expand Down Expand Up @@ -247,7 +247,7 @@

.selectize-control.single .selectize-input {
&, input { cursor: pointer; }
&.focus, &.focus input { cursor: text; }
&.input-active, &.input-active input { cursor: text; }

&:after {
content: ' ';
Expand Down
Loading

0 comments on commit 7f450db

Please sign in to comment.