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

mark to it #930

Closed
wants to merge 7 commits into from
Closed

mark to it #930

wants to merge 7 commits into from

Conversation

KokoTa
Copy link

@KokoTa KokoTa commented Sep 21, 2017

测试测试,笨蛋测试。感谢出版作者和出版商!
PS:尝试添加了一下简单的翻页功能,书中添加评论的方式保持不变,在渲染时动态加载评论,不知道是否同意合并?😄

@amaruk
Copy link
Collaborator

amaruk commented Sep 25, 2017

简单测了一下,似乎对IE11支持不好。Firefox可以。
我们问一下Bin Liu的意见,看是否有必要添加翻页。
@liubin

@KokoTa
Copy link
Author

KokoTa commented Sep 25, 2017

代码使用了ES6的语法,可以更改为ES5语法,那样应该就能兼容了。
谢谢你的回复。

@amaruk
Copy link
Collaborator

amaruk commented Oct 18, 2017

@KokoTa 可否先尝试改为ES5?IE11不支持=>的function形式,以及array from。

@KokoTa
Copy link
Author

KokoTa commented Oct 18, 2017

@amaruk 尝试修复了一下,不知道还有木有问题

@amaruk
Copy link
Collaborator

amaruk commented Oct 19, 2017

页码的下拉菜单已经能显示出来了,加载时除了HTML里的部分标签的小错误之外也没有报js的error,但是留言内容都为空白,晚点试着调试一下。Firefox依然没问题。

@amaruk
Copy link
Collaborator

amaruk commented Oct 21, 2017

@KokoTa
IE11里,draw通过outerHTML只能获取到p标签,而没有内容,得到的数据类似:
<p class="impression"></p>
所以最终页面上只有空白的段落。
留言条数是对的,得到的p标签里面诸如align之类的属性也在,说明marks确实获取到了留言的p标签,但解析的时候IE有问题?
Firefox里outerHTML是全的。

@KokoTa
Copy link
Author

KokoTa commented Oct 21, 2017

@amaruk 关于这个问题确实是IE的BUG,它对outerHTML的支持不是很规范,获取标签到转成数组这里的outerHTML都可以正常显示内容,但是slice截取之后就剩最外层标签了,里面的内容丢失了,所以我在思考能不能单独把IE的情况拿出来,最近的话会修改代码再提交

@KokoTa
Copy link
Author

KokoTa commented Nov 3, 2017

@amaruk IE的情况找了好久的原因也搞不明白,不过我hack了一下,用JSON的方法把数据固定住了,这样IE11就能正常显示了,您可以测试一下

amaruk added a commit that referenced this pull request Nov 7, 2017
@amaruk
Copy link
Collaborator

amaruk commented Nov 7, 2017

Manually merged and updated this pull request.
Thank you for your efforts!

@amaruk amaruk closed this Nov 7, 2017
@amaruk amaruk mentioned this pull request Nov 7, 2017
3 tasks
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

2 participants