Page MenuHomePhabricator

prevent newlines in term fields
Closed, ResolvedPublic


When in edit mode and entering a newline (return key on the keyboard), the behavior of the edit field is unclear.


  • a newline should not insert a line break
  • a newline will be ignored when entered in a focused edit field
  • when being copied in an edit field a newline will be replaced with an empty string.

Open question:
How will aliases separated by pipes be copied?
Would it be possible to replace line breaks in aliases by inserting pipes or actually insert line breaks (as aliases will be separated by something similar to a newline anyhow as stated in T218690)?

Event Timeline

Currently implemented in
The name (inputautoexpand) suggested that the same code also deals with what T220185 is trying to achieve.

Change 501590 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[wikibase/termbox@master] Term inputs: prevent newlines

@Hanna_Petruschat_WMDE Thank you for the very precise task definition. One question to be sure: the current wikidata termbox does not replace newlines with "a space" but with an empty string. Is this change in behavior intended?

Nope. This is my missing ability to define this as needed in tech tongue (I was even googling a "correct" term and apparently didn't come across one)

Thanks, @Hanna_Petruschat_WMDE - fixed the description accordingly.

Change 501590 merged by jenkins-bot:
[wikibase/termbox@master] Term inputs: prevent newlines