NetTalk Central

Author Topic: Hide / Unhide Text Box Adds Extra Spaces  (Read 5821 times)

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Hide / Unhide Text Box Adds Extra Spaces
« on: November 11, 2009, 02:08:44 AM »
Nettalk : 4.37
Clarion 6.3.9059

What the title says....
It's quicker to show you than knock up an example:

Eg. I have a drop Down On Memory Form that will  Hide, or Unhide A Text Box Depending on it's value.


When the drop down is set to the correct value, the text box is unhidden (together with the other fields show) BUT a number of blank spaces are pre-filled in the box. Selecting the text box will put the cursor where I have shown below.

As usual, this only happens on IE8. All other browsers work fine.


Thanks
Bryan
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #1 on: November 11, 2009, 04:58:23 AM »
Hi Bryan,

there's a bug in firefox that necessitates that an empty text box contain a space character. But as far as I know this only adds a single leading space.

I've not seen the effect you're getting with multiple spaces being added.

cheers
Bruce

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #2 on: November 11, 2009, 08:35:05 AM »
Ok.

Well it's easily replicateable.

Here is web1 example app. I've edited the form so the "Activate Auto Responder" check box hides/unhides the Response Text Box.

When the text box is unhidden, either click on it, or tab to it, and the cursor will be in the position I described above.

http://files.me.com/bryanh/v1hxcr

Bryan
Thanks

Bryan

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #3 on: November 30, 2009, 06:49:31 AM »
Can confim it still does this in version 4.40
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #4 on: November 30, 2009, 10:21:08 PM »
Because of a bug in FireFox the space needs to be there. However I've adjusted the code for 4.41 so that it only appears if you are using FF, and only if the control is sent asynchronously (for example by unhiding it.)

cheers
Bruce

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #5 on: December 01, 2009, 01:43:49 AM »
I know a single space is needed, you've already explained that.
BUT I was reporting multiple spaces.
Hopefully eliminating the spaces for non FF browers will make the problem go away.
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #6 on: December 01, 2009, 06:35:02 AM »
hopefully.
Although in my testing here I was only getting a single space.
I've uploaded 4.41 - keep us posted.

cheers
Bruce

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #7 on: December 02, 2009, 02:42:45 AM »
Nothing had changed in 4.41.
Extra spaces described above still happens when a text box is unhidden. Plus a single space still happens on normal text boxes in IE. Shouldn't that of stopped now?

PS: Actually I've just realised it isn't extra spaces it is adding, it is a tab (chr 9) it is adding to the front of the text field.
« Last Edit: December 02, 2009, 03:41:45 AM by spot1701 »
Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Hide / Unhide Text Box Adds Extra Spaces
« Reply #8 on: December 03, 2009, 11:03:34 PM »
Hi Bryan,

as usual I missed the key part of your report;

>> As usual, this only happens on IE8. All other browsers work fine.

I've been testing on FF and IE7 - so that's why I got lost.

I can duplicate the effect here, but there's no real simple solution. You can "prime" the text box with something (it only happens when the box is empty).

On the up side, it appears that the problem is gone in NetTalk 5. So I can only surmise it has to do with the way the async reply is handled by the js framework.

Cheers
Bruce