Some ASP.NET AJAX Control Toolkit elements no longer work in Chrome since v36 update

Posted By BORNXenon Wed 23 Jul 2014
Add to Favorites0

Some ASP.NET AJAX Control Toolkit elements no longer work in Chrome...

Author Message
BORNXenon
 Posted Wed 23 Jul 2014
Supreme Being

Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Specifically the link to show the SEO fields on the _ModifyProduct page, however, I fear that other functionality may also no longer work since the last Chrome update. I have not tested anything frontend yet, but it is likely that some functionality no longer works as expected, or at all.

Worse, it appears that they have no intention of fixing the bug introduced in the latest update.

https://code.google.com/p/chromium/issues/detail?id=395318
BORNXenon
 Posted Wed 23 Jul 2014
Supreme Being

Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Double post FTW!! Smile

For anyone affected by the new Chrome Update (v36) which breaks some AJAX Toolkit features, create a file in your Javascript folder called Chromev36Fix.js, open it and add the following lines of code:


$(document).ready(function () {
if (Sys.Extended && Sys.Extended.UI && Sys.Extended.UI.HtmlEditorExtenderBehavior && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) {
Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () {
//html encode
var char = 3;
var sel = null;

setTimeout(function () {
if (this._editableDiv != null)
this._editableDiv.focus();
}, 0);
if (Sys.Browser.agent != Sys.Browser.Firefox) {
if (document.selection) {
sel = document.selection.createRange();
sel.moveStart('character', char);
sel.select();
}
else {
if (this._editableDiv.firstChild != null && this._editableDiv.firstChild != undefined) {
sel = window.getSelection();
sel.collapse(this._editableDiv.firstChild, char);
}
}
}

//Encode html tags
this._textbox._element.value = this._encodeHtml();
}
}
});


You will then need to add the following lines of code to the bottom of your Template.master page:

<script type="text/javascript" src="JavaScript/Chromev36Fix.js"></script>



You will also need to add the following lines to the bottom of your Skins/Admin/Template.master page after the
</form>
tag:



<!-- Load up javascript -->
<script type="text/javascript" src="../JavaScript/k26000/jquery.js"></script>
<script type="text/javascript" src="../JavaScript/Chromev36Fix.js"></script>
BORNXenon
 Posted Thu 24 Jul 2014
Supreme Being

Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Triple post!!

While the above does seem to fix the SEO link issue caused by the Chrome update, it doesn't appear to have fixed the Submit / Cancel / Delete buttons on the Attributes (and I'm guessing other) pages.

I think it is probably because the buttons are loaded dynamically but who knows. My javascript is very rusty and at this point I'm stumped! Sad

Oh well, back to firefox we go!
BORNXenon
 Posted Thu 24 Jul 2014
Supreme Being

Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)Supreme Being - (34,941 reputation)

Group: Forum Members
Last Active: Mon 23 Apr 2018
Posts: 59, Visits: 291
Am I the only one on this forum??!!

Anyhow, I have figured out why the attribute buttons won't work even with the above fix in Chrome v36.
It is because they are loaded when you click the 'New' linkbutton which causes a partial postback to the server so it doesn't reload the page and as a result the
$(document).ready

is not hit after the postback and therefore doesn't run the code which fixes the problem.

To sort this out, change the line of code from:

$(document).ready(function () {


to:

function pageLoad() {


and also take of the last bracket at the bottom of the code, so from this:

});


to this:

};


Hope this helps somebody. Smile
Paul
 Posted Thu 24 Jul 2014
große Käse

große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Cool stuff, I was reading that thread on the chromium site couple of days back and was hoping someone would figure out a fix. I'll see if I can get this working in our core code.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
WithaG
 Posted Tue 29 Jul 2014
Supreme Being

Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)Supreme Being - (7,605 reputation)

Group: Forum Members
Last Active: Mon 19 Nov 2018
Posts: 12, Visits: 46
BORNXenon, you are a complete star! I'd only just noticed this problem having upgraded to Kartris 2.6 today and I thought I must have messed up the installation somehow when I couldn't do anything in the admin area.

Thanks for saving me days of hair-loss trying to figure this out. I had been a Chrome convert until now!


djjohnson
 Posted Tue 18 Nov 2014
Supreme Being

Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)

Group: Forum Members
Last Active: Thu 26 Feb 2015
Posts: 45, Visits: 103
I only have a Template.Master in my skins folder. Is there something I'm missing?

D.J. Johnson
V.P. Development and Operations
NTS Services Corp
DataBackup.com
Paul
 Posted Thu 20 Nov 2014
große Käse

große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)große Käse - (522,492 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Do you mean there are no other folders or files, or just no other .master pages? There should be a whole bunch of CSS and other files in a skin folder, and an images folder full of images.

Other .master files are optional. If you just have template.master, this will be used for the homepage too.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
djjohnson
 Posted Thu 20 Nov 2014
Supreme Being

Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)

Group: Forum Members
Last Active: Thu 26 Feb 2015
Posts: 45, Visits: 103
Yes, I only have the Template.Master I'm using the KartrisAccordion skin. I put the code into place, but had to comment it back out because it made the scrolling images on the homepage just stack one on top of the other.

D.J. Johnson
V.P. Development and Operations
NTS Services Corp
DataBackup.com
djjohnson
 Posted Wed 26 Nov 2014
Supreme Being

Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)Supreme Being - (25,547 reputation)

Group: Forum Members
Last Active: Thu 26 Feb 2015
Posts: 45, Visits: 103
Do you think it just has to with the javascript in the slider?

D.J. Johnson
V.P. Development and Operations
NTS Services Corp
DataBackup.com

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top