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

Can't use :hover pseudo-class in JSB #44

Closed
GoogleCodeExporter opened this issue Jun 26, 2015 · 2 comments
Closed

Can't use :hover pseudo-class in JSB #44

GoogleCodeExporter opened this issue Jun 26, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This code throws an exception in Firefox:

new base2.JSB.RuleList({
  "a[type=command]:hover": {
    style: { backgroundColor: "yellow" }
  }
});

The exception in Firefox:
  [Exception... "'SyntaxError: 'a[type=command]:hover' is not a valid CSS selector.' when calling   
method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c 
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

In Safari: 'a[type=command]:hover' is not a valid CSS selector.


The thing: I'm not sure if you intend for this code to work (using dynamic 
pseudo selectors), but the 
Firefox exception should really be caught, and re-thrown a bit more friendly.

BTW: the new grid-view for the issues rulez! (first, I didn't notice the 
List/Grid choice on the right)

Original issue reported on code.google.com by doek...@gmail.com on 25 Jul 2007 at 2:58

@GoogleCodeExporter
Copy link
Author

I don't think this is a bug. The Selectors API does not support dynamic pseudo
classes. In JSB you already have the mouseover/mouseout events. You should use 
those
in conjunction with addClass/removeClass. Maybe a more friendly error message 
though. :-)

BTW, I think I prefer the list view but the grid view is admittedly cool.

Original comment by dean.edw...@gmail.com on 25 Jul 2007 at 5:23

@GoogleCodeExporter
Copy link
Author

I've filtered the exception, and gave a bit more descriptive message. 

I think I will continue using the list-view. But the grid-view is handy to get 
some overview (the settings should persist however)...

Original comment by doek...@gmail.com on 26 Jul 2007 at 3:30

  • Changed state: Fixed

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

No branches or pull requests

1 participant