We've found MaintainScrollPositionOnPostback appears to be not compatible with Safari. Are there any workarounds in this situation ie to still use the page property and some elegant fix for Safari?
Anyone else found this problem?
We could try and detect the Safari Browser, and then do something custom - but then perhaps its better to simply ditch using the built in MaintainScrollPositionOnPostback - and use a custom solution for ALL browsers!
Might want to ask yourself if its worth the time and effort to support the possibly of something like 1 person a month visiting the site with Safari (if 100 people visit a month, etc). It just might not be feasible. Of course if it is a large site, you will
want to cover as many possibilities as you can.
Yes it is actually a very large site, hence is needed.
However we have fixed it, and posting the solution for others. All we needed to do was to edit the Browser Capabilities file, and explicitly set it so that MaintainScrollPositionOnPostback is supported on Safari Browsers.
I have the same issue with Safari, however I am unable to get this working with the Browser Definition File. I have pasted the def file below. If you could share your Browser Definition File I would really appreciate it.
I'm not entirely sure how we got to the Browser Cap files, as this was done by someone else in team, and I'm here as a contractor. I think it was then compiled and stored in the GAC. Do you perhaps need to compile your Browser Caps file ? (just a thought).
However from what I see the capability seems to be fine. Perhaps Safari is not being picked up by the regex and being picked up elsewhere.
Old thread but I had this problem myself recently and here is a solution. Create a new file, SafariFix.browser. In that file, put the following xml data:
Mickeyp
Member
112 Points
33 Posts
MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found this...
Apr 02, 2007 10:16 AM|LINK
Hi,
We've found MaintainScrollPositionOnPostback appears to be not compatible with Safari. Are there any workarounds in this situation ie to still use the page property and some elegant fix for Safari?
Anyone else found this problem?
We could try and detect the Safari Browser, and then do something custom - but then perhaps its better to simply ditch using the built in MaintainScrollPositionOnPostback - and use a custom solution for ALL browsers!
Thanks
CSharpSean
Contributor
5464 Points
917 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Apr 02, 2007 03:54 PM|LINK
1.7% of internet users use Safari. With this low percentage, users that actually visiting your site with Safari could possibly be even lower. [http://www.w3schools.com/browsers/browsers_stats.asp]
Might want to ask yourself if its worth the time and effort to support the possibly of something like 1 person a month visiting the site with Safari (if 100 people visit a month, etc). It just might not be feasible. Of course if it is a large site, you will want to cover as many possibilities as you can.
But if your requirements make your web-app support Safari, you can check out the following link and use some useful javascript approaches:
http://aspnet.4guysfromrolla.com/articles/111704-1.aspx
Search term: asp.net javascript maintain scroll position
Mickeyp
Member
112 Points
33 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Apr 04, 2007 02:33 PM|LINK
Yes it is actually a very large site, hence is needed.
However we have fixed it, and posting the solution for others. All we needed to do was to edit the Browser Capabilities file, and explicitly set it so that MaintainScrollPositionOnPostback is supported on Safari Browsers.
andrew_bourn...
Member
7 Points
3 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Apr 15, 2007 02:29 PM|LINK
Hi Mike,
I have the same issue with Safari, however I am unable to get this working with the Browser Definition File. I have pasted the def file below. If you could share your Browser Definition File I would really appreciate it.
Thanks
Andrew
<browsers>
<browser id="GenericMozilla5" parentID="Mozilla">
<identification>
<userAgent match="Mozilla/5\.(?'minor'\d+).*[C|c]ompatible; ?(?'browser'.+); ?\+?(http://.+)\)" />
</identification>
<capabilities>
<capability name="majorversion" value="5" />
<capability name="minorversion" value="${minor}" />
<capability name="browser" value="${browser}" />
<capability name="Version" value="5.${minor}" />
<capability name="activexcontrols" value="true" />
<capability name="backgroundsounds" value="true" />
<capability name="cookies" value="true" />
<capability name="css1" value="true" />
<capability name="css2" value="true" />
<capability name="ecmascriptversion" value="1.2" />
<capability name="frames" value="true" />
<capability name="javaapplets" value="true" />
<capability name="javascript" value="true" />
<capability name="jscriptversion" value="5.0" />
<capability name="supportsCallback" value="true" />
<capability name="supportsFileUpload" value="true" />
<capability name="supportsMultilineTextBoxDisplay" value="true" />
<capability name="supportsMaintainScrollPositionOnPostback" value="true" />
<capability name="supportsVCard" value="true" />
<capability name="supportsXmlHttp" value="true" />
<capability name="tables" value="true" />
<capability name="vbscript" value="true" />
<capability name="w3cdomversion" value="1.0" />
<capability name="xml" value="true" />
<capability name="tagwriter" value="System.Web.UI.HtmlTextWriter" />
</capabilities>
</browser>
</browsers>
Mickeyp
Member
112 Points
33 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Apr 16, 2007 08:13 AM|LINK
Hi Andrew,
I'm not entirely sure how we got to the Browser Cap files, as this was done by someone else in team, and I'm here as a contractor. I think it was then compiled and stored in the GAC. Do you perhaps need to compile your Browser Caps file ? (just a thought). However from what I see the capability seems to be fine. Perhaps Safari is not being picked up by the regex and being picked up elsewhere.
Cheers
maxald
Member
46 Points
66 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Feb 25, 2008 12:40 PM|LINK
<browsers> <browser refID="Safari1Plus"> <capabilities> <capability name="supportsMaintainScrollPositionOnPostback" value="true" /> </capabilities> </browser> </browsers>Put this file in your root directory or in the App_Browsers folder.mkamoski
Contributor
5694 Points
1565 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Jun 15, 2010 02:57 PM|LINK
Max (and all) --
Do you happen to know what the "refID" value should be for Google Chrome?
Please advise.
I want to try the fix (shown above) for Chrome compatibility.
FYI, I have discussed this a little in the following thread...
"
maintainscrollpositiononpostback is not working in Google Chrome 5.0.353.70 beta
http://forums.asp.net/t/1568732.aspx
"
Thank you.
-- Mark Kamoski
MaintainScrollPositiononPostback Chrome browser capabilities
march11
Contributor
3017 Points
1367 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Dec 29, 2010 05:36 PM|LINK
I realize this is an old post but I am having this issue.
What type of a file is SafariFix.browser aspx, xml, txt etc ?
ninjaninja
Member
25 Points
103 Posts
Re: MaintainScrollPositionOnPostback appears not to be compatible with Safari, anyone else found ...
Mar 02, 2011 10:41 AM|LINK