Centering textInput without centering text cursor

PennController for IBEX Forums Support Centering textInput without centering text cursor

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4980
    mawilson
    Participant

    I can create, center, and display a newTextInput with the following code:

    newTextInput().center().print()

    When I do this, the text area itself is centered (as desired). However, the cursor inside the text area is also centered, so the text expands from the center as participants type, as shown:
    centered text cursor

    Is there a way to center the text area, but have the text cursor start at the left side, like this?
    text cursor left

    • This topic was modified 4 years ago by mawilson.
    • This topic was modified 4 years ago by mawilson.
    #4982
    Jeremy
    Keymaster

    Hello,

    Ah, right, I noticed this problem before. I doubt anyone would even want to center the cursor, so I should probably change the effect of the center command on TextInput elements. In the meantime, you can do this:

    newTextInput().cssContainer("text-align","center").print()

    Jeremy

    #4984
    mawilson
    Participant

    Thanks, that works great!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.