gehuangyi20 / ie7-js

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

"background-color: inherit;" ignored for <input> elements #241

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Apply a background-color to an element.
2. Set a child element with a default background (such as <input
type="text">) to use background-color: inherit;
3. IE8 will ignore the rule (with or without IE9.js)

What is the expected output? What do you see instead?
That the background-color of the <input> tag to change to its parent's
background-color.

What version of the product are you using? On what operating system?
IE8.

Please provide any additional information below.
I can't determine a quick fix to the IE9.js code, though I think the
recalc: function (line 732) may have something to do with it.
What is desired is essentially the following:

if(object.style.backgroundColor == 'inherit') {
    object.style.backgroundColor = object.parentNode.style.backgroundColor;
}

Original issue reported on code.google.com by ISV.Damo...@gmail.com on 19 Apr 2010 at 4:07

GoogleCodeExporter commented 9 years ago
Can you provide a test page please? try to make it as simple as possible.

Original comment by dean.edw...@gmail.com on 25 Apr 2010 at 3:04

GoogleCodeExporter commented 9 years ago
Here you go: http://dev4.david.research.ucf.edu/tabular/issue241.html

Original comment by ISV.Damo...@gmail.com on 26 Apr 2010 at 12:34

GoogleCodeExporter commented 9 years ago
I can't connect to that server. Is the URL correct?

Original comment by dean.edw...@gmail.com on 26 Apr 2010 at 3:09

GoogleCodeExporter commented 9 years ago
Sorry, I forgot that the dev server is intranet-only. Check here:
http://david.research.ucf.edu/tabular/issue241.html

Original comment by ISV.Damo...@gmail.com on 26 Apr 2010 at 3:11

GoogleCodeExporter commented 9 years ago
Great. The perfect test page! Thanks for doing this.

Original comment by dean.edw...@gmail.com on 26 Apr 2010 at 3:15

GoogleCodeExporter commented 9 years ago
No problem. If I may ask, what's the status on being able to re-run the script 
for
correcting the CSS of dynamic pages?

Original comment by ISV.Damo...@gmail.com on 26 Apr 2010 at 3:24

GoogleCodeExporter commented 9 years ago
I'm not really working on ie7-recalc.js at the moment and I probably won't for 
a while.

Original comment by dean.edw...@gmail.com on 27 Apr 2010 at 8:06

GoogleCodeExporter commented 9 years ago
This bug seems to only affect <input> and <textarea> elements in MSIE8. You'll 
notice 
that it works in compatibility mode.

IE7.js fixes inherit for MSIE5-7 but doesn't bother for MSIE8 as it is already 
supposed 
to work.

This bug is too much of an edge case to be worth fixing.

Original comment by dean.edw...@gmail.com on 27 Apr 2010 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by dean.edw...@gmail.com on 27 Apr 2010 at 8:14

GoogleCodeExporter commented 9 years ago
When I run it in compatibility mode, it's not exactly working. The 
background-color
is changed to the parent's background color when initialized and in 
compatibility
mode, but when mouseover occurs for either the input box or the parent, the 
input box
does not change color.

Original comment by ISV.Damo...@gmail.com on 28 Apr 2010 at 2:46

GoogleCodeExporter commented 9 years ago
Oh, by the way, I found the solution for automatically reloading the IE9.js 
file:

function reload() {
   if(window.ActiveXObject) {
      var e=document.createElement('script');
      e.setAttribute('src','http://ie7-js.googlecode.com/svn/version/2.1(beta3)/IE9.js');
      document.body.appendChild(e);
      document.body.removeChild(e);
   }
}

Original comment by ISV.Damo...@gmail.com on 28 Apr 2010 at 4:01

GoogleCodeExporter commented 9 years ago
Err... change "reload" to "ie9_reload".

Original comment by ISV.Damo...@gmail.com on 28 Apr 2010 at 4:04

GoogleCodeExporter commented 9 years ago
You're right, there is still a problem with dynamic inherited styles, that's 
why the 
:hover is not working.

Original comment by dean.edw...@gmail.com on 3 May 2010 at 7:45