web fx xload tree bug
http://webfx.eae.net/dhtml/xloadtree/ 主頁樹寫得不錯,但是樹有二個 bug.
第一:
獲得焦點(diǎn)問題,當(dāng)我們點(diǎn)擊樹節(jié)點(diǎn)時會獲得焦點(diǎn),然后將這個焦點(diǎn)存儲到全局對象中。當(dāng)點(diǎn)擊另一個焦點(diǎn)時,它先判斷全局對象這個焦點(diǎn)是否存在,如果存在,則將焦點(diǎn)釋放,然后將點(diǎn)擊的焦點(diǎn)再次存儲到全局對象中。整個邏輯是對的,但是在IE下,有時候會出現(xiàn)多個焦點(diǎn)情況,可以肯定的說,這不是樹的 bug ,是 IE 對內(nèi)存對象管理的 bug.
第二:
<?xml version="1.0"?>
<tree>
<tree text="Load "tree1.xml"" src="tree1.xml" />
<tree text="Loaded Item 1" action="http://webfx.eae.net" />
<tree text="Loaded Item 2">
<tree text="Loaded Item 2.1" action="javascript:alert(2.1)" />
</tree>
<tree text="Loaded Item 3 (with target)" action="http://www.google.com" target="_new" />
<tree text="Load "tree1.xml"">
<tree text="Load "tree1.xml"">
</tree>
</tree>
</tree>
直接解析這段 xml 文檔,就會發(fā)現(xiàn),最后節(jié)點(diǎn)打開后,子節(jié)點(diǎn)前面不是空白圖片。<tree>
<tree text="Load "tree1.xml"" src="tree1.xml" />
<tree text="Loaded Item 1" action="http://webfx.eae.net" />
<tree text="Loaded Item 2">
<tree text="Loaded Item 2.1" action="javascript:alert(2.1)" />
</tree>
<tree text="Loaded Item 3 (with target)" action="http://www.google.com" target="_new" />
<tree text="Load "tree1.xml"">
<tree text="Load "tree1.xml"">
</tree>
</tree>
</tree>
posted on 2009-11-11 17:58 星期五 閱讀(201) 評論(0) 編輯 收藏 所屬分類: WEB FX