Commit Graph

20 Commits

Author SHA1 Message Date
Brian Hicks
5df3294ef3
use strict everywhere 2022-11-22 08:36:38 -06:00
Brian Hicks
133ac75dbd
define the CustomElement variable 2022-11-22 08:35:57 -06:00
Tessa Kelly
a7c2a6c02f 💀 InputStyles.V3, TextArea.V4 2022-11-03 10:45:59 -06:00
Tessa Kelly
381f9bb79d Fix typo 2022-10-25 14:00:10 -06:00
Tessa Kelly
293aa37857 Revert "apply review suggestion"
This reverts commit e105d9d8df.
2022-10-10 16:00:10 -06:00
Tessa
e105d9d8df apply review suggestion 2022-10-10 15:58:49 -06:00
Tessa Kelly
4826d98c14 Update versions 2022-10-10 09:32:03 -06:00
Tessa Kelly
4751ddc256 cp TextArea.V4 to TextArea.V5 2022-10-10 09:29:33 -06:00
Tessa Kelly
bd7fe9d301 💀 remove old JS code" 2022-08-25 14:52:45 -07:00
Brian Hicks
e262018e10
run prettier on modified V4.js 2022-05-26 16:04:15 -05:00
Brian Hicks
f77b9a52e3
fix all prettier violations 2022-05-26 16:02:31 -05:00
Tessa
3a4f07e9e0
typo 2022-05-24 14:38:24 -07:00
Brian Hicks
8aace1fc6b
only add the border when box-sizing: border-box 2022-05-24 11:24:14 -05:00
Brian Hicks
3c104c5736
account for border offset when setting height 2022-05-24 11:24:14 -05:00
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
Stoeffel
873f0ef521 move files into subdirectory 2020-03-02 10:45:03 +01:00
Michael Hadley
ccb52d032c Create matching custom element for V4 text area 2019-01-16 12:49:03 -08: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