Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(autocomplete): prevents text from going under the clear button
Browse files Browse the repository at this point in the history
Closes #2193
Closes #2578
  • Loading branch information
Robert Messerle committed May 30, 2015
1 parent a7dcfb6 commit 73e03a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
11 changes: 2 additions & 9 deletions src/components/autocomplete/autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ md-autocomplete {
position: relative;
overflow: visible;
height: 40px;

md-progress-linear {
position: absolute;
bottom: 0; left: 0; width: 100%;
Expand All @@ -86,9 +85,6 @@ md-autocomplete {
}
}
input:not(.md-input) {
position: absolute;
left: 0;
top: 0;
width: 100%;
box-sizing: border-box;
border: none;
Expand All @@ -104,13 +100,10 @@ md-autocomplete {
}
}
button {
position: absolute;
top: 10px;
right: 10px;
position: relative;
line-height: 20px;
text-align: center;
width: 20px;
height: 20px;
width: 40px;
cursor: pointer;
border: none;
border-radius: 50%;
Expand Down
9 changes: 6 additions & 3 deletions src/components/autocomplete/js/autocompleteDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
},
template: function (element, attr) {
return '\
<md-autocomplete-wrap ng-class="{ \'md-whiteframe-z1\': !floatingLabel }" role="listbox">\
<md-autocomplete-wrap\
layout="row"\
ng-class="{ \'md-whiteframe-z1\': !floatingLabel }"\
role="listbox">\
' + getInputElement() + '\
<button\
type="button"\
Expand Down Expand Up @@ -145,7 +148,7 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
function getInputElement() {
if (attr.mdFloatingLabel) {
return '\
<md-input-container ng-if="floatingLabel">\
<md-input-container flex ng-if="floatingLabel">\
<label>{{floatingLabel}}</label>\
<input type="search"\
id="fl-input-{{$mdAutocompleteCtrl.id}}"\
Expand All @@ -165,7 +168,7 @@ function MdAutocomplete ($mdTheming, $mdUtil) {
</md-input-container>';
} else {
return '\
<input type="search"\
<input flex type="search"\
id="input-{{$mdAutocompleteCtrl.id}}"\
name="{{name}}"\
ng-if="!floatingLabel"\
Expand Down

1 comment on commit 73e03a7

@tianvan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robertmesserle you realy hard !👍

Please sign in to comment.