sonnb
Well-known member
Hello,
There are some users might experience with javascript error on xfInsert event. This might occur on new reply or after inline-edit the post. The post disappear but could not be shown again.
The javascript console would show:
This kind of error does not occur on all browsers, this might cause by jQuery library or conflict with another library.
After investigate I see that in XF source code:
You could see that XF would hide the element first then later use fadeDown function to use show up animation.
This could be easy resolved by change
This is strange since hide() function is shortcut to set css display property to none. But I think in the next version, we should use css('display', 'none) instead of hide() to avoid this kind of problem.
There are some users might experience with javascript error on xfInsert event. This might occur on new reply or after inline-edit the post. The post disappear but could not be shown again.
The javascript console would show:
NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [nsIDOMWindow.getComputedStyle]
...conds();wa=na.getUTCMilliseconds();}na=(pa<=0||pa>=10000?(pa<0?"-":"+")+o(6,pa<0...
This kind of error does not occur on all browsers, this might cause by jQuery library or conflict with another library.
After investigate I see that in XF source code:
HTML:
xfInsert: function(insertMethod, insertReference, animateMethod, animateSpeed, callback)
{
if (insertMethod == 'replaceAll')
{
$(insertReference).xfFadeUp(animateSpeed);
}
this
.addClass('__XenForoActivator')
.hide()
[insertMethod || 'appendTo'](insertReference)
.xfActivate()
[animateMethod || 'xfFadeDown'](animateSpeed, callback);
return this;
},
You could see that XF would hide the element first then later use fadeDown function to use show up animation.
This could be easy resolved by change
Code:
hide() to .css('display', 'none)
This is strange since hide() function is shortcut to set css display property to none. But I think in the next version, we should use css('display', 'none) instead of hide() to avoid this kind of problem.