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

Closed
jiyinyiyong opened this Issue Aug 22, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@jiyinyiyong

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

This comment has been minimized.

Show comment
Hide comment
@timdown

timdown Aug 22, 2014

Owner

OK. I've probably messed something up.

Owner

timdown commented Aug 22, 2014

OK. I've probably messed something up.

@timdown

This comment has been minimized.

Show comment
Hide comment
@timdown

timdown Aug 22, 2014

Owner

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.

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.

@jiyinyiyong

This comment has been minimized.

Show comment
Hide comment
@jiyinyiyong

jiyinyiyong 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

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

This comment has been minimized.

Show comment
Hide comment
@timdown

timdown Aug 22, 2014

Owner

Confirmed. Working on it.

Owner

timdown commented Aug 22, 2014

Confirmed. Working on it.

timdown added a commit that referenced this issue Aug 22, 2014

@timdown

This comment has been minimized.

Show comment
Hide comment
@timdown

timdown Aug 22, 2014

Owner

Fixed.

Owner

timdown commented Aug 22, 2014

Fixed.

@timdown timdown closed this Aug 22, 2014

@jiyinyiyong

This comment has been minimized.

Show comment
Hide comment
@jiyinyiyong

jiyinyiyong Aug 22, 2014

Thanks. Confirm working here :)

Thanks. Confirm working here :)

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