File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
import { observe } from 'selector-observer'
3
3
// import { default as autosize } from '@github/textarea-autosize'
4
4
import { tabToIndentListener } from 'indent-textarea'
5
- import { insert , wrapSelection } from 'text-field-edit'
5
+ import { insertTextIntoField as insert , wrapFieldSelection as wrapSelection } from 'text-field-edit'
6
6
import { stop } from '../helpers/dom'
7
7
8
8
interface Subscriber {
@@ -148,6 +148,10 @@ const oneKeyFormatting = onKeydown((event) => {
148
148
149
149
const autosize = function autosize ( el : Element ) : Subscriber {
150
150
const textarea = el as HTMLTextAreaElement
151
+ if ( 'fieldSizing' in textarea . style ) {
152
+ textarea . style . fieldSizing = 'content'
153
+ return { unsubscribe ( ) { } }
154
+ }
151
155
152
156
function fitSize ( ) {
153
157
textarea . style . height = '0'
You can’t perform that action at this time.
0 commit comments