Closed Bug 567505 Opened 14 years ago Closed 14 years ago

using image instead of content for a Jetpack widget results in onClick not firing

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: erikvvold, Assigned: dietrich)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: 0.4 RC 1

When I use image instead of content for a widget item, then the onClick no longer fires.

Reproducible: Always

Steps to Reproduce:
1. Make a Jetpack widget element with a label, content (just an image), and an onClick handler
2. Test it until it works
3. use image instead of content
4. the onClick does not fire in this case
Actual Results:  
Nothing happens onClick

Expected Results:  
onClick should have fired

This warning & error combo repeats five times when I press the widget when it's using image and not content:

Warning: reference to undefined property e.target.location
Source File: file:///Users/erikvvold/jetpack/jetpack-sdk/packages/jetpack-core/lib/securable-module.js -> resource://google-translate-it-jetpack-core-lib/widget.js
Line: 458

Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"  nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)"  location: "JS frame :: file:///Users/erikvvold/jetpack/jetpack-sdk/packages/jetpack-core/lib/securable-module.js -> resource://google-translate-it-jetpack-core-lib/widget.js :: loadURIIsMatch :: line 427"  data: no]
Version: unspecified → Trunk
Attached patch v1Splinter Review
- add tests for the event handlers that use the image property
- make the about:blank check explicit
- make the image doc check clearer
Assignee: nobody → dietrich
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #447019 - Flags: review?(myk)
OS: Mac OS X → All
Hardware: x86 → All
Blocks: 567504
Comment on attachment 447019 [details] [diff] [review]
v1

Looks good, r=myk and a=myk for landing during the 0.4 freeze, as we should take this noteworthy fix.
Attachment #447019 - Flags: review?(myk) → review+
http://hg.mozilla.org/labs/jetpack-sdk/rev/1fa0d242371f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: