gehuangyi20 / ie7-js

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

Form elements with padding are broken rather than fixed by the script #187

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a page with <input> and <select> items.
2. give these items a fixed size and a padding, although <select> fails
even without

I expect padding to behave similar to Firefox and Chrome. Without IE8.js,
IE6 and 7 work as expected. However, with the script applied the elements
become too large, as if the padding is added one additional time.

Using IE8.js from beta3. Problem appears on both IE6 and IE7 using Windows
2000 and XP.

I have fixed the problem for myself by excluding the input, select and
textarea tags from the resizing adjustment procedure. I've added the
following lines under line 1537 in the source version:

if(element.tagName == 'INPUT' || element.tagName == 'SELECT' ||
element.tagName == 'TEXTAREA') {
  /* these tags get broken if adjusted */
  return getPixelWidth(element, value);                                   

}

Original issue reported on code.google.com by mair...@gmail.com on 26 Jun 2009 at 3:17

Attachments:

GoogleCodeExporter commented 9 years ago
Can you provide a simple test page to illustrate the problem? I won't include 
any 
patches without a test case.

Original comment by dean.edw...@gmail.com on 11 Feb 2010 at 5:54