sp.ui.rte.debug.js moveToElementText 参数无效

Invalid argument on Line 7353 in sp.ui.rte.debug.js

SharePointOOBError

This is still a problem after the December 2010 CU.

*** PROCEED WITH THE FOLLOWING AT YOUR OWN RISK ***

If you need an interim fix then we need to fix the offending JavaScript, and doing this breaks mySharePoint Golden Rule No. 6 – Never Modify the OOB files.  However if you need to do it then you might do something like this:

  1. Navigate to your LAYOUTS folder, usually at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
  2. Make a copy of SP.UI.Rte.debug.js and SP.UI.Rte.js to restore for later when this is fixed in an update. (Restore your vanilla copy before running any subsequent CU’s or Service Packs)
  3. Edit the SP.UI.Rte.debug.js around line 7353 …. from this:
    parentElement: function() {ULSkay:;
        var $v_0 = this.$8;
        if ($v_0.parentElement) {
            var $v_2 = $v_0.parentElement();
            var $v_3 = RTE.DomHelper.createRange(window.document);
            if ($v_2) {
                $v_3.moveToElementText($v_2);
            }
            while ($v_2 && !$v_3.inRange($v_0)) {
                $v_2 = $v_2.parentNode;
                try {
                    $v_3.moveToElementText($v_2);
                }
                catch ($$e_3_0) {
                }
            }
    To look like this:
    parentElement: function () {
            ULSkay: ;
            var $v_0 = this.$8;
            if ($v_0.parentElement) {
                var $v_2 = $v_0.parentElement();
                var $v_3 = RTE.DomHelper.createRange(window.document);
                if ($v_2) {
                    try {
                        $v_3.moveToElementText($v_2);
                    } catch (gonk) {
                        //Do Nothing - SharePoint Bug.
                    }
                }
                while ($v_2 && !$v_3.inRange($v_0)) {
                    $v_2 = $v_2.parentNode;
                    try {
                        $v_3.moveToElementText($v_2);
                    }
                    catch ($$e_3_0) {
                    }
  4. Save your changes and copy SP.UI.Rte.debug.js over the top of SP.UI.Rte.js – remembering that you have backups of both of these files to restore before applying future updates.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值