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

rangy.getSelection is undefined in 1.3.0-alpha.20140822 #241

Closed
tiye opened this issue Aug 22, 2014 · 6 comments
Closed

rangy.getSelection is undefined in 1.3.0-alpha.20140822 #241

tiye opened this issue Aug 22, 2014 · 6 comments

Comments

@tiye
Copy link

tiye commented Aug 22, 2014

Just installed this Bower package rangy-offcial but only included range-core in my project. And I got an error when I was calling getSelection:

-> rangy.version
<- "1.3.0-alpha.20140822"
-> rangy.initialized
<- true
-> rangy.getSelection
<- undefined
@timdown
Copy link
Owner

timdown commented Aug 22, 2014

OK. I've probably messed something up.

@timdown
Copy link
Owner

timdown commented Aug 22, 2014

How did you include rangy-core? Given that the Bower package is just copies of the official release, any problem has to be in Rangy itself rather than the Bower stuff.

@tiye
Copy link
Author

tiye commented Aug 22, 2014

I was loading it via RequireJS as usual. I found one of demo omitted rangy.init() so I tried to drop that too. But neight way works. Something like:

requirejs.config
  paths:
    'rangy': '../bower_components/rangy-official/lib/rangy-core'
require ['rangy'], (rangy) ->
  rangy.init() # also tried the case I don't call it
  rangy.getSelection() # where I found that was undefined

@timdown
Copy link
Owner

timdown commented Aug 22, 2014

Confirmed. Working on it.

timdown pushed a commit that referenced this issue Aug 22, 2014
@timdown
Copy link
Owner

timdown commented Aug 22, 2014

Fixed.

@timdown timdown closed this as completed Aug 22, 2014
@tiye
Copy link
Author

tiye commented Aug 22, 2014

Thanks. Confirm working here :)

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