当我展开Sitecore内容树时,当内容树显示垂直滚动条时,如果我向下滚动并选择树底部的项目,它会滚动到顶部。 这只发生在Firefox,IE10,IE9,Chrome中,它运行正常。 我最近做了Sitecore升级。有没有人遇到类似的问题?请帮忙!
Sitecore.NET 6.6.0(rev.130404)
Firefox版本 - 21,22
答案 0 :(得分:1)
我遇到了类似问题,并就此与Sitecore支持联系。他们为我提供了以下适用于我们的解决方案:
- 打开\ sitecore \ shell \ Controls \ Gecko.js
- 在第668行替换
scBrowser.prototype.resizeFixsizeElements = function() {
var form = $$("form")[0];
this.fixsizeElements.each(function(element) {
var height = form.getHeight() - element.scHeightAdjustment + "px";
element.setStyle({ height: height });
});
/* trigger re-layouting to fix the firefox bug: table is not shrinking itself down on resize */
scGeckoRelayout();
}
由:
scBrowser.prototype.resizeFixsizeElements = function() {
var form = $$("form")[0];
if (!form) {
return;
}
this.fixsizeElements.each(function (element) {
if (!element.hasClassName('scFixSizeNested')) {
element.setStyle({ height: '100%' });
}
});
var maxHeight = 0;
var formChilds = form.childNodes;
for (var i = 0; i != formChilds.length; i++) {
var elementHeight = formChilds[i].offsetHeight;
if (elementHeight > maxHeight) {
maxHeight = elementHeight;
}
}
var formHeight = form.offsetHeight;
this.fixsizeElements.each(function (element) {
var height = element.hasClassName('scFixSizeNested')
? (form.getHeight() - element.scHeightAdjustment) + 'px'
: (element.offsetHeight - (maxHeight - formHeight)) + 'px';
element.setStyle({ height: height });
});
/* trigger re-layouting to fix the firefox bug: table is not shrinking itself down on resize */
scGeckoRelayout();
}
答案 1 :(得分:1)
感谢Sitecore的支持,发现了这个问题,
由于Fixefox在某些属性发生更改后刷新html控件,因此会出现此问题。选择项目后,内容树面板s width is changed and as a result it is redrawn. Developed workaround forbids changing of the controls
大小用于Firefox的静态控件(如内容树)。在Firefox中,后果可能是不正确的窗口大小调整(更改浏览器窗口的高度)。要实现变通方法,请在路径“Website \ sitecore \ shell \ Controls \ Gecko.js”下使用附加的一个清除浏览器缓存替换其中的exicting。请通知我们结果。
scBrowser.prototype.resizeFixsizeElements = function() {
var form = $$("form")[0];
if (!form) {
return;
}
if (!this.isFirefox)
{
this.fixsizeElements.each(function (element) {
if (!element.hasClassName('scFixSizeNested')) {
element.setStyle({ height: '100%' });
}
});
var maxHeight = 0;
var formChilds = form.childNodes;
for (var i = 0; i != formChilds.length; i++) {
var elementHeight = formChilds[i].offsetHeight;
if (elementHeight > maxHeight) {
maxHeight = elementHeight;
}
}
var formHeight = form.offsetHeight;
this.fixsizeElements.each(function (element) {
var height = element.hasClassName('scFixSizeNested')
? (form.getHeight() - element.scHeightAdjustment) + 'px'
: (element.offsetHeight - (maxHeight - formHeight)) + 'px';
element.setStyle({ height: height });
});
}
/* trigger re-layouting to fix the firefox bug: table is not shrinking itself down on resize */
scGeckoRelayout();
}