简体   繁体   English

Google Chrome中确实很奇怪的渲染行为

[英]Really strange render behavior in Google Chrome

I was playing a little bit with JavaScript and jQuery and I noticed something wrong in Google Chrome but not in Mozilla Firefox. 我玩了JavaScript和jQuery,发现Google Chrome出现了问题,但Mozilla Firefox没有出现问题。 The problem is that ALL the inputs update correctly except the one with the Opacity label. 问题在于,除了带有不透明度标签的输入之外, 所有输入均正确更新。

It gets updated in a strange way like when I focus in or focus out or when I click five or six times. 它会以一种奇怪的方式进行更新,例如当我聚焦或聚焦或单击五六次时。

Here's the FIDDLE . 这是FIDDLE (use the arrows in each input to change value) (使用每个输入中的箭头更改值)

Why Google Chrome renders the Bad Input number field like that and the other fields not? 为什么Google Chrome会像这样显示“ Bad Input数字”字段,而其他字段却不这样?

If you don't get any strange behavior it seems it's from my machine (Linux Mint 17), but don't now for sure. 如果您没有任何奇怪的行为,那似乎是我的机器(Linux Mint 17)发出的,但是现在不确定。

EDIT: 编辑:

I'm expecting the inputs to increment/decrement instantly when you click the arrows.For some inputs works and for others the update is delayed or something. 当您单击箭头时,我期望输入会立即增加/减少。对于某些输入有效,对于其他输入则更新延迟或某些原因。

Reproduced, using Mac OS Mavericks and the latest Chrome / Firefox. 使用Mac OS Mavericks和最新的Chrome / Firefox复制。

For some reason it breaks with the -webkit-filter rule in the .colorPicker styles. 由于某些原因,它与.colorPicker样式中的-webkit-filter规则中断。 You can replace it with a box-shadow, and it works OK, and looks the same: 您可以将其替换为阴影框,它可以正常运行,并且外观相同:

.panel, color .colorPicker {
...
  /*-webkit-filter: drop-shadow(0 0 3px black);*/
  box-shadow: 0 0 3px black;
...
}

http://jsfiddle.net/w9S7Y/52/ http://jsfiddle.net/w9S7Y/52/

...but exactly why remains a mystery! ...但是到底为什么仍然是个谜! As Vivek points out in the comments above, in the fiddle in the orig post, you can also force the inout to redraw by resizing the window. 正如Vivek在上面的评论中指出的那样,在orig帖子的小提琴中,您也可以通过调整窗口大小来强制inout重新绘制。 So for some reason the Blink repaint process is getting blocked by the -webkit-filter. 因此,由于某些原因,-webkit-filter阻止了Blink重绘过程。

Currently reading through Blink bugs... 目前正在阅读闪烁错误...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM