printdotio / pio.js

An embeddable widget that enables users to quickly and easily monetize a webpage by enabling photo-product sales of its images.
4 stars 0 forks source link

Clicking 'View All Products' closes the widget #53

Closed fromkeith closed 10 years ago

fromkeith commented 10 years ago

Click the 'View All Products' menu item closes the widget. I am unable to determine how to prevent this, as the 'onClose' callback does not provide context as to which event is causing it to be closed. To us the 'View All Products' menu item implies that it should be going back to the first product overview page, and not close.

I've added logs to onEvent and onClose to help show whats going on:

Click: View All Products
onEvent: (key, val)
    Key analytics-pageview val [object Object]
    Key section-init val [object Object]
    Key goto-products val undefined
    Key analytics-event val [object Object]
onClose:
    close
onEvent: (key, val)
     Key close

This is further complicated by https://github.com/printdotio/pio.js/issues/50 (style.showHeader has inconsistent behavior). I cannot turn off the header reliably, and thus remove the 'View All Products' menu item.

micahasmith commented 10 years ago

@fromkeith fixed in next release

bhox commented 10 years ago

Fixed in live