Skip to content

Commit

Permalink
Fix material bar position in textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
samiheikki committed Feb 10, 2019
1 parent 8a5f0ac commit c89c0c2
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/visual/common.html
Expand Up @@ -5,6 +5,10 @@
font-size: 0;
height: 24px;
}

:host(.hidden-scrollbar) [part="input-field"]::-webkit-scrollbar {
display: none;
}
</style>
</template>
</dom-module>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions test/visual/vaadin-text-area/text-area-2.html
Expand Up @@ -40,6 +40,8 @@
invalid: <vaadin-text-area required invalid></vaadin-text-area>
<p>
label: <vaadin-text-area label="Foo"></vaadin-text-area>
<p>
label and value: <vaadin-text-area label="Foo" value="Bar"></vaadin-text-area>
</fieldset>
</form>

Expand Down
16 changes: 14 additions & 2 deletions test/visual/vaadin-text-area/text-area-3.html
Expand Up @@ -11,6 +11,11 @@
window.addEventListener('WebComponentsReady', function() {
setTimeout(function() {
window.ShadyDOM && window.ShadyDOM.flush(); // Force DOM composition

// Scroll fixed height text-area to bottom
const fixedHeightInputField = document.querySelector('#fixed-height').shadowRoot.querySelector('[part=input-field]');
fixedHeightInputField.scrollTop = fixedHeightInputField.scrollHeight;

window.webComponentsAreReady = true; // Checked in gemini before capture callback
});
});
Expand All @@ -33,15 +38,22 @@

<form>
<fieldset id="text-area">
label and value: <vaadin-text-area label="Foo" value="Bar"></vaadin-text-area>
<p>
prefix and suffix:
<vaadin-text-area label="Foo" value="Bar">
<span slot="prefix">prefix</span>
<span slot="suffix">suffix</span>
</vaadin-text-area>
<p>
long: <vaadin-text-area label="Foo" value="Bar" style="width: 300px;"></vaadin-text-area>
<p> fixed height: <vaadin-text-area id="fixed-height" class="hidden-scrollbar" style="height: 150px;" value="
Go Vaadin
Go
Go
Go
Go
Go
Go
Go"></vaadin-text-area>
</fieldset>
</form>

Expand Down
1 change: 1 addition & 0 deletions theme/material/vaadin-text-area-styles.html
Expand Up @@ -4,6 +4,7 @@
<template>
<style include="material-text-field">
[part="input-field"] {
position: initial;
height: auto;
box-sizing: border-box;
}
Expand Down

0 comments on commit c89c0c2

Please sign in to comment.