JQuery UI中的Tabs與base元素摩擦的BUG

來源:互聯網
上載者:User

標籤:http   io   使用   java   ar   div   2014   問題   cti   

JQuery UI中的Tabs與base元素衝突的BUG
  以前一直使用jquery-ui-1.8,最近打算試一下目前最新的版本1.11。但對於Tabs,頁面是亂的,怎麼也不正常。折騰了好幾個小時,最後發現頁面中使用的base元素,對Tabs有破壞性的影響。
  沒有想清楚具體的原因,先記下來再說吧。

  到了晚上,又想起這個問題。這個問題實在討厭,我的系統中所有頁面中都使用了base元素,不解決這個衝突實在是不爽。經過幾個小時的跟蹤調試,終於發現的問題所在:
  新版本的jquery UI中,Tabs的代碼存在一處錯誤,注意代碼片斷的第22行。

_isLocal: (function() {var rhash = /#.*$/;return function( anchor ) {var anchorUrl, locationUrl;// support: IE7// IE7 doesn‘t normalize the href property when set via script (#9317)anchor = anchor.cloneNode( false );anchorUrl = anchor.href.replace( rhash, "" );locationUrl = location.href.replace( rhash, "" );// decoding may throw an error if the URL isn‘t UTF-8 (#9518)try {anchorUrl = decodeURIComponent( anchorUrl );} catch ( error ) {}try {locationUrl = decodeURIComponent( locationUrl );} catch ( error ) {}return anchor.hash.length > 1 || anchorUrl === locationUrl;//原來為&&};



  發現這個BUG很興奮,專門註冊了個帳號,去jquery UI的論壇上發了個BUG報告文章。


JQuery UI中的Tabs與base元素摩擦的BUG

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.