Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading jQuery UI CSS results in error #19

Open
wood-chris opened this issue Apr 7, 2021 · 4 comments
Open

loading jQuery UI CSS results in error #19

wood-chris opened this issue Apr 7, 2021 · 4 comments

Comments

@wood-chris
Copy link

Following the tutorial, but trying to load a local copy of the jQuery UI CSS results in an error:

import jp_proxy_widget
from IPython.display import display

myCSStest = jp_proxy_widget.JSProxyWidget()

my_styles = "my_app/jquery-ui.css"

myCSStest.check_jquery()
myCSStest.load_css(my_styles)

myCSStest.js_init("""
element.html('<div><em class="random-style-for-testing">Styled widget element.</em></div>')
""")

display(myCSStest)

results in

Uninitialized Proxy Widget
new error message: TypeError: that.$$el.jQuery(...).prop is not a function
@AaronWatters
Copy link
Owner

AaronWatters commented Apr 14, 2021

Sorry for the delayed reply. I was not able to reproduce this in a simple way.

Are you using Lab or "classic notebook"? Can you make the style file available somewhere?
Does this happen only for jqueryui styles or also for other style files?

thanks!

@wood-chris
Copy link
Author

That's ok!

It's in a classic notebook. It might be something weird with me, but I don't know what.

Running the same code in 2 separate notebooks but in the same conda env from a clean kernel results in an error message in one but not the other 🤯

Screenshot 2021-04-14 at 21 27 29

Screenshot 2021-04-14 at 21 28 03

This isn't jquery-ui.css, so does happen with other CSS files. I'm not sure if this is actually anything to do with jp_proxy_widget but I'm not sure where to start with debugging!

@AaronWatters
Copy link
Owner

Hmmm. One place to look is the javascript console in the browser developer tools.

@AaronWatters
Copy link
Owner

I'm wondering if this could be a browser or platform issue.
What platform (linux/mac/windows) are you using and what browser (chrome, IE, safari, firefox...)?

The package was developed and tested using Chrome/chromium mainly on Macs. I think it should work on Chrome anywhere.
It may not work for other browsers in other platforms -- notably Safari and iE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants