diff --git a/ionic/components/text-input/test/text-input.spec.ts b/ionic/components/text-input/test/text-input.spec.ts index a8f39f4e45..5f27d54ac2 100644 --- a/ionic/components/text-input/test/text-input.spec.ts +++ b/ionic/components/text-input/test/text-input.spec.ts @@ -14,7 +14,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(-205); expect(scrollData.scrollTo).toBe(235); @@ -33,7 +33,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(-205); expect(scrollData.scrollTo).toBe(235); @@ -53,7 +53,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(150); expect(scrollData.scrollTo).toBe(100); @@ -73,7 +73,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(-80); expect(scrollData.scrollTo).toBe(100); @@ -91,7 +91,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(-20); expect(scrollData.scrollTo).toBe(20); @@ -109,7 +109,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(-180); expect(scrollData.scrollTo).toBe(180); @@ -128,7 +128,7 @@ export function run() { let keyboardHeight = 400; let platformHeight = 800; - let scrollData = TextInput.getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); + let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight); expect(scrollData.scrollAmount).toBe(0); }); diff --git a/ionic/components/text-input/text-input.ts b/ionic/components/text-input/text-input.ts index ad54e5ccfe..328b4c42f5 100644 --- a/ionic/components/text-input/text-input.ts +++ b/ionic/components/text-input/text-input.ts @@ -160,7 +160,7 @@ export class TextInput { // find out if text input should be manually scrolled into view let ele = this.elementRef.nativeElement; - let scrollData = TextInput.getScollData(ele.offsetTop, ele.offsetHeight, scrollView.getDimensions(), this.keyboardHeight, this.platform.height()); + let scrollData = TextInput.getScrollData(ele.offsetTop, ele.offsetHeight, scrollView.getDimensions(), this.keyboardHeight, this.platform.height()); if (scrollData.scrollAmount > -3 && scrollData.scrollAmount < 3) { // the text input is in a safe position that doesn't require // it to be scrolled into view, just set focus now @@ -211,7 +211,7 @@ export class TextInput { * @param {TODO} keyboardHeight TODO * @returns {TODO} TODO */ - static getScollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, plaformHeight) { + static getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, plaformHeight) { // compute input's Y values relative to the body let inputTop = (inputOffsetTop + scrollViewDimensions.contentTop - scrollViewDimensions.scrollTop); let inputBottom = (inputTop + inputOffsetHeight);