Commit Graph

14 Commits

Author SHA1 Message Date
Michael Hadley
b907c12d7a Prevent text area with auto resize from jumping scroll position
The old logic looked like this:

```
if (this._textarea.scrollHeight > minHeight) {
  this._textarea.style.height = minHeight + 'px'
  this._textarea.style.height = this._textarea.scrollHeight + 'px'
}
```

Imagine a case where the `minHeight` is actually less than the current
height of the text area due to the current content. The height of the
element would be set to a smaller value, and then later reset to the
desired height. This causes the overall scroll height of the page to
shrink (because the text-area did), and then expand again. Now the
scroll position for the user on the page has changed, and this happens
on every keystroke.

This change just skips the first assignment to `.height`. I'm not sure why it
was initially there, but I can't see a reason for keeping it (especially
since it seems to be the cause of this bug).
2020-03-27 11:34:00 -07:00
Gavin Panella
28d36c6f64 Revert "Merge pull request #461 from NoRedInk/puffins/prepare-for-merge"
This reverts commit 4373c78d82, reversing
changes made to 6b78075f02.
2020-03-06 20:00:34 +01:00
Renee Tremlab
9a52b4d0d9 bump version (7.21.0 => 7.22.0) 2020-03-02 16:13:08 -08:00
Renee Tremlab
1a617230e3 Add gift icon to UiIcon.V1 2020-03-02 15:44:21 -08:00
Jasper Woudenberg
bb0588225a Account for move of code into subdir in netlify.toml 2020-03-02 10:32:00 +00:00
Jasper Woudenberg
a472ee1462 Move travis yaml back to top level
Without this travis won't run.
2020-03-02 10:25:49 +00:00
Stoeffel
7cc604e719 run travis in subdirectory 2020-03-02 11:09:29 +01:00
Stoeffel
873f0ef521 move files into subdirectory 2020-03-02 10:45:03 +01:00
Michael Hadley
ba068ac32e Export CustomElement 2019-01-16 17:44:22 -08:00
Michael Hadley
ccb52d032c Create matching custom element for V4 text area 2019-01-16 12:49:03 -08:00
Luke Westby
aac0c1febc
Direct class compatibility (#146)
* drop support for attributes and move class compatibility into factory

* fix docs

* bring back attributes for now

* forgot attribute change in class, don't load shim

* delete native-shim file

* make it more minification-friendly

* fix docs

* no need for method names
2018-10-30 16:26:27 -07:00
Juan Edi
2fe2287ecc Use correct constructor for custom events when they are available
We were correctly checking if the CustomEvent constructor was available but then
using `Event`, which wouldn't give us access to the additional details.
2018-07-24 09:20:50 -03:00
Luke Westby
2342836ac1
make sure it exists (#73) 2018-06-13 16:49:45 -07:00
Luke Westby
38ca396ac8
Updates to TextArea (#70)
* update textarea js code and make it npm-ready

* use an attribute instead so dom debugging is easier

* use data- attribute to be I D I O M A T I C

* version the custom element

* include marica's resize logic improvements

* changes to elm module

* clean up styleguide build and use v3 in styleguide
2018-06-11 11:08:49 -07:00