Skip to content

Commit

Permalink
TextFieldTextEditor: exposed resetScrollOnFocusOut as a public proper…
Browse files Browse the repository at this point in the history
…ty (closes #1659)
  • Loading branch information
joshtynjala committed Mar 19, 2018
1 parent 374e233 commit 8ab6696
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions source/feathers/controls/text/TextFieldTextEditor.as
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,31 @@ package feathers.controls.text
/**
* @private
*/
protected var resetScrollOnFocusOut:Boolean = true;
protected var _resetScrollOnFocusOut:Boolean = true;

/**
* Indicates of the text editor resets its current scroll position to
* 0 on focus out.
*
* <p>In the following example, the scroll position is not reset on focus out:</p>
*
* <listing version="3.0">
* textEditor.resetScrollOnFocusOut = false;</listing>
*
* @default true
*/
public function get resetScrollOnFocusOut():Boolean
{
return this._resetScrollOnFocusOut;
}

/**
* @private
*/
public function set resetScrollOnFocusOut(value:Boolean):void
{
this._resetScrollOnFocusOut = value;
}

/**
* @private
Expand Down Expand Up @@ -2581,7 +2605,7 @@ package feathers.controls.text
this._textFieldHasFocus = false;
this.stage.removeEventListener(TouchEvent.TOUCH, stage_touchHandler);

if(this.resetScrollOnFocusOut)
if(this._resetScrollOnFocusOut)
{
this.textField.scrollH = this.textField.scrollV = 0;
}
Expand Down

0 comments on commit 8ab6696

Please sign in to comment.