Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update element.js #1075

Merged
merged 1 commit into from Jul 17, 2022
Merged

Update element.js #1075

merged 1 commit into from Jul 17, 2022

Conversation

MonsterUncle
Copy link
Contributor

tab 删除li click定位不准,加上判断tabName

tab 删除li click定位不准,加上判断tabName
@sunxiaobin89
Copy link
Member

从你提交的代码中判断你那边存在往ul中添加了非li的节点,然后需要关闭的时候找到下一个切换的li节点对么?如果是的话这个提交的修改意义不大,因为规范中要求ul的子节点只能是li,不要放其他的标签,所以不需要再加后面的判断,个人看法仅供参考。
https://html.spec.whatwg.org/#the-ul-element

@sentsim sentsim closed this Jul 10, 2022
@MonsterUncle
Copy link
Contributor Author

正常没有出现span,但是有未选中会出现
image

@MonsterUncle
Copy link
Contributor Author

如果这个不是layui加的,那此pr可以关闭了

@sentsim
Copy link
Member

sentsim commented Jul 11, 2022

如果这个不是layui加的,那此pr可以关闭了

额,这个是显示更多的一个箭头图标,动态插入的,是 Layui 加的。
当标签在最后一个时,确实会存在你描述的这个问题,下个版本会优化此处。

@sentsim sentsim reopened this Jul 11, 2022
@sunxiaobin89
Copy link
Member

sunxiaobin89 commented Jul 11, 2022

有这个描述就清晰多了,想起了以前fly社区也有人提过这个,tab最后一个标签关闭的时候异常问题,span在这确实不太合适,预计调整会将span移出ul,关闭的判断还是保持不变,毕竟目前是不符合规范的用法,这样处理相对会更加合理一些。

@sentsim sentsim merged commit 0ce911a into layui:main Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants