ElkArte Community

Elk Development => Bug Reports => Topic started by: live627 on May 30, 2017, 03:49:45 am

Title: Newlines in signatures don't work
Post by: live627 on May 30, 2017, 03:49:45 am
Tried adding
Code: [Select]
test
to my sig after three newlines and it didn't update. The preview still works.
Title: Re: Newlines in signatures don't work
Post by: Frenzie on May 30, 2017, 04:32:05 am
The bug might be how the Maximum amount of lines setting is communicated to the user rather than a bug in the system itself.
Title: Re: Newlines in signatures don't work
Post by: emanuele on May 30, 2017, 06:05:46 am
IIRC the preview should consider limitations as well (but I may wrong, of course).
That said, I don't remember what kind of limits we have here...
Title: Re: Newlines in signatures don't work
Post by: emanuele on May 30, 2017, 07:12:22 am
By my tests, multiple new lines are trimmed down to one.

So I guess it is kind of intended.
That said, is this an acceptable behaviour?
Or it is better to let new lines be?
Title: Re: Newlines in signatures don't work
Post by: Frenzie on May 30, 2017, 07:33:26 am
Quote from: emanuele – IIRC the preview should consider limitations as well (but I may wrong, of course).
You're wrong. :P (It doesn't, at least not on this site.)

The problem is merely that the user doesn't know that the reason their signature is only displaying x lines is because it's trimmed down to x lines.

For a realtime JS thingy you'd need a simple line number thingy along these lines

Code: [Select]
function getLineNumber(element) {
  return element.val().split('\n').length;
}

and a simple onkeyup or something that checks whether that's smaller than or equal to the limit.

I mean that similar to how it says "Max characters: 300; characters remaining: 300"

Also you get an error from the server if you try to update your profile:
Quote The following errors occurred when trying to update your profile:

    Your signature cannot be greater than 300 characters

That doesn't happen for newlines.
Title: Re: Newlines in signatures don't work
Post by: emanuele on May 30, 2017, 05:16:02 pm
Good point. nods
Title: Re: Newlines in signatures don't work
Post by: Spuds on May 30, 2017, 06:04:13 pm
PR, BR, or FR
Title: Re: Newlines in signatures don't work
Post by: live627 on May 30, 2017, 08:08:54 pm
QR