Skip to content

Commit 15b3ae2

Browse files
committed
stop scrolling on edit in entity
1 parent 5c08b7d commit 15b3ae2

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

OpenFlow/src/public/Controllers.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,7 @@ export class EntityCtrl extends entityCtrl<Base> {
23352335
ids.push(this.model._acl[i]._id);
23362336
}
23372337
}
2338+
if (this.model._encrypt == null) { this.model._encrypt = []; }
23382339
if (!this.$scope.$$phase) { this.$scope.$apply(); }
23392340
this.fixtextarea();
23402341
}
@@ -2343,13 +2344,14 @@ export class EntityCtrl extends entityCtrl<Base> {
23432344
const tx = document.getElementsByTagName('textarea');
23442345
for (let i = 0; i < tx.length; i++) {
23452346
tx[i].setAttribute('style', 'height:' + (tx[i].scrollHeight) + 'px;overflow-y:hidden;');
2346-
tx[i].addEventListener("input", OnInput, false);
2347+
// tx[i].addEventListener("input", OnInput, false);
23472348
}
23482349

2349-
function OnInput() {
2350-
this.style.height = 'auto';
2351-
this.style.height = (this.scrollHeight) + 'px';
2352-
}
2350+
// function OnInput() {
2351+
// console.log(this.scrollHeight);
2352+
// this.style.height = 'auto';
2353+
// this.style.height = (this.scrollHeight) + 'px';
2354+
// }
23532355

23542356
}, 500);
23552357
}

0 commit comments

Comments
 (0)