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
jiyinyiyong opened this issue Aug 22, 2014 · 6 comments
Closed

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

jiyinyiyong opened this issue Aug 22, 2014 · 6 comments

Comments

@jiyinyiyong
Copy link

@jiyinyiyong jiyinyiyong 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 timdown commented Aug 22, 2014

OK. I've probably messed something up.

@timdown
Copy link
Owner

@timdown 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.

@jiyinyiyong
Copy link
Author

@jiyinyiyong jiyinyiyong 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 timdown commented Aug 22, 2014

Confirmed. Working on it.

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

@timdown timdown commented Aug 22, 2014

Fixed.

@timdown timdown closed this Aug 22, 2014
@jiyinyiyong
Copy link
Author

@jiyinyiyong jiyinyiyong 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.