Insane Chrome问题... Chrome呈现扭曲? [英] Insane Chrome issue...Chrome renders twisties?

查看:132
本文介绍了Insane Chrome问题... Chrome呈现扭曲?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能我是愚蠢的,俯视的东西,但我有一个奇怪的问题,只发生在Chrome(12.0.7,但也许其他版本)。查看此网站:




details元素表示
披露小部件,用户
可以从该小部件获取附加信息或
控件。



..



开放内容属性是一个
布尔属性。如果存在,它
表示细节将被显示给用户
。如果属性为
,则不显示
的详细信息。



创建元素时,如果
属性不存在,细节
应该隐藏;如果属性是
不存在,则应显示详细信息。
随后,如果属性是
删除,则详细信息应为
hidden;如果添加了属性,应显示
的详细信息。



用户代理应允许用户
请求详细信息显示
或隐藏。
为了满足要显示
详细信息的请求,用户代理
必须将
元素上的open属性设置为值打开。为了满足
请求隐藏细节,
用户代理必须从元素中删除打开的
属性。


某些版本的Chrome 12(开发者版本)添加了对打开和关闭元素的适当支持。



根据 http://caniuse.com/#search=details ,Chrome



为了解决这个问题,我想你应该替换的细节元素与其他一些元素。


Probably I'm being stupid and overlooking something, but I am having a bizarre issue that only occurs in Chrome (12.0.7, but maybe other versions as well). Check out this site:

http://www.jungledragon.com

On the right side, you will notice a community update panel. This is how it looks in any major browser except Chrome:

And here is how it renders in Chrome:

It renders twisties? When you click on one, it expands the row. Clicking again collapses the row. Nowhere in my code do I have any markup to implement such behavior. Is this some kind of special behavior because I am using figure tags? I tested this site in Chrome before and it was no issue then, so it could be a recent bug.

解决方案

The details element is supposed to exhibit the behaviour you're experiencing in Chrome.

The spec:

The details element represents a disclosure widget from which the user can obtain additional information or controls.

..

The open content attribute is a boolean attribute. If present, it indicates that the details are to be shown to the user. If the attribute is absent, the details are not to be shown.

When the element is created, if the attribute is absent, the details should be hidden; if the attribute is absent, the details should be shown. Subsequently, if the attribute is removed, then the details should be hidden; if the attribute is added, the details should be shown.

The user agent should allow the user to request that the details be shown or hidden. To honor a request for the details to be shown, the user agent must set the open attribute on the element to the value open. To honor a request for the details to be hidden, the user agent must remove the open attribute from the element.

Some version of Chrome 12 (dev channel) added proper support for opening and closing the details element.

According to http://caniuse.com/#search=details, Chrome is the only browser to support this at the moment.

To fix this, I think you should replace the details element with some other element.

这篇关于Insane Chrome问题... Chrome呈现扭曲?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆