Skip to content

Commit

Permalink
Merge e41a32e into 68a9eba
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed May 17, 2019
2 parents 68a9eba + e41a32e commit b5cbaff
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion test/visual/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ gemini.suite('vaadin-text-field', function(rootSuite) {
suite
.setUrl(`vaadin-text-area/text-area-1.html?theme=${theme}`)
.setCaptureElements('#text-area')
.capture('text-area-1');
.capture('text-area-1', function(actions) {
actions.executeJS(function(window) {
window.scrollTextArea();
});
});
});

gemini.suite(`text-area-2-${theme}`, function(suite) {
Expand Down
10 changes: 9 additions & 1 deletion test/visual/vaadin-text-area/text-area-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<p>
focused: <vaadin-text-area autofocus class="hidden-caret"></vaadin-text-area>
<p>
readonly: <vaadin-text-area readonly value="
readonly: <vaadin-text-area readonly style="max-height: 100px;" value="
Go Vaadin
Go
Go
Expand All @@ -48,4 +48,12 @@
</fieldset>
</form>

<script>
// eslint-disable-next-line no-unused-vars
function scrollTextArea() {
const textarea = document.querySelector('[readonly]');
textarea.shadowRoot.querySelector('[part="input-field"]').scrollTop = 50;
}
</script>

</body>
9 changes: 9 additions & 0 deletions theme/lumo/vaadin-text-area-styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
display: none;
}

:host([readonly]) [part="input-field"] {
border: 1px dashed var(--lumo-contrast-30pct);
margin: -1px;
}

:host([readonly]) [part="input-field"]::after {
border: none;
}

:host(:hover:not([readonly]):not([focused])) [part="input-field"] {
background-color: var(--lumo-contrast-20pct);
}
Expand Down

0 comments on commit b5cbaff

Please sign in to comment.