Background CSS property not applied to INPUT elements injected via pageMod

RESOLVED WORKSFORME

Status

--
critical
RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: rxtxup, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 744232 [details]
inputstylespossiblebug.xpi

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

Steps to reproduce:

Created a simple addon, all main.js code listed below:
require("sdk/page-mod").PageMod({
  include: "*",
  contentScript: 'var el = document.createElement("input"); el.type = "text"; el.id = "inputElFromAddon"; el.style="background: green;"; document.body.appendChild(el);',
  contentStyle: '#inputElFromAddon {background: green !important;}'
});


Actual results:

Background CSS property not working on created input element.


Expected results:

Background of the INPUT should work.
(Reporter)

Updated

6 years ago
Severity: normal → critical
OS: All → Windows 7
Hardware: All → x86
Can you still reproduce this with the current tip of the Github master branch https://github.com/mozilla/addon-sdk ?

Alternatively, can you try running the attached xpi against a recent Firefox Nightly build http://nightly.mozilla.org/ ?

I think things have landed since SDK 1.14 was shipped that changes the behavior of our applied CSS, so this may already be fixed in the most recent copies of the SDK and/or Firefox.
Eugene, I tested the lib/main code in both release and nightlies, and seems to be working fine (input at bottom of the page, green background)
Flags: needinfo?(rxtxup)
To clarify, both release/nightly with current tip of master branch, and as the XPI using the release/nightly SDK
(Reporter)

Comment 4

6 years ago
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #2)
> Eugene, I tested the lib/main code in both release and nightlies, and seems
> to be working fine (input at bottom of the page, green background)

What OS was used for test?
I'm on the latest Addon SDK release, have you tried my .xpi attached?
I added screenshot to attached files list with results.
Flags: needinfo?(rxtxup)
(Reporter)

Comment 5

6 years ago
Created attachment 744546 [details]
input bg should be green
(Reporter)

Comment 6

6 years ago
SOLVED.
This is bug in addon-sdk-1.14 release.
The latest dev version from https://github.com/mozilla/addon-sdk fixed.

Updated

6 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.