gehuangyi20 / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

javascript error line 534 when border-spacing has two values IE8-js-2.0(beta3) #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. CSS table has border-collapse:separate; border-spacing: 0 1px;
2.
3.

What is the expected output? What do you see instead?
It should honor border-spacing when it has two values

javascript error on line 534: Invalid argument

What version of the product are you using? On what operating system?
IE8.js 2.0(beta3)
Windows XP SP3 IE7.0.5730.13

Please provide any additional information below.
This error does not occur is there is only one value for border-spacing.

var getPixelValue = function(element, value) {
  if (PIXEL.test(value)) return parseInt(value);
  var style = element.style.left;
  var runtimeStyle = element.runtimeStyle.left;
  element.runtimeStyle.left = element.currentStyle.left;
  element.style.left = value || 0;               <<-- line 534
  value = element.style.pixelLeft;
  element.style.left = style;
  element.runtimeStyle.left = runtimeStyle;
  return value;
};

Original issue reported on code.google.com by webnu...@gmail.com on 21 Feb 2009 at 6:28

GoogleCodeExporter commented 9 years ago
Fixed by splitting the values and using the first value.

Original comment by dean.edw...@gmail.com on 8 Feb 2010 at 4:05