Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when doing a partial postback on an ASP.NET website #215

Open
ghost opened this issue Jun 25, 2014 · 1 comment
Open

Issue when doing a partial postback on an ASP.NET website #215

ghost opened this issue Jun 25, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 25, 2014

Hi there,

Can I ask what the reason is for having a focus call in the clear placeholder function? I'll describe my problem below:

In IE8 (maybe earlier browsers, but haven't checked), the control would fire a partial postback after a button click. This would cause the form delegate to fire, which in turn caused the clear placeholder function to fire on each of the inputs. Inside this method, it focusses each password field. The result being (since the last password field is below the fold) that the scroll position is changes when the field gains focus, so that it's within the field of view. I therefore did two things which fixed it for me:

  1. Commented out the focussing code - "$input.focus();"
  2. Fired the placeholder plugin on a partial postback of the page using Sys.WebForms.PageRequestManager.getInstance().add_endRequest(FunctionToInitialisePlaceholders);

Is the focussing required, because it seems to have caused me issues with unintentional page scrolling on a partial postback.

@amerikan
Copy link
Collaborator

The whole focus issue seems somewhat related to #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant