jquery-atwho-rails 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e175b0c1d92d3d414cbe8cf439b14ab7fcf98e42
4
- data.tar.gz: d561cd5c31287188104ed2417af2dd44c2418d91
3
+ metadata.gz: f23f3dd69a13e3d32ba15c24cf482ae50f7c25de
4
+ data.tar.gz: 515be810af285936cdb4bf39a92f6a0c9b831f96
5
5
  SHA512:
6
- metadata.gz: fc281180227c6e072a7bc07b8e1bb409962d9b50681ddd75c80421710ca6afa09435819bc8e2993d8e8715e439da6ff502cadc1f783b607c2cd732309fde5226
7
- data.tar.gz: 0a54a8ce1e6018e0925e69352dedce87fb5c1b06045120d0030c9b652e934456327256a0c2cc46e5e160a184bac5e36f358456f3b7360962383ae1222d795c26
6
+ metadata.gz: b65e6355e267e761c7235fafcff88510a3fa3e7453fb40be0d726351875bcbe7ac6805a268172af0af53412939b99c5421d227df286c455ad9ff410467109af1
7
+ data.tar.gz: 93d434497c9da9508767bf21bf7c1fe673f869f1e25abfc35ce1d3426d732499273c3d96467887d55fedb1d15341a6131e1e725a9e33757f6af38b7e9ab04a09
@@ -183,15 +183,18 @@
183
183
  };
184
184
 
185
185
  Caret.prototype.getIEOffset = function(pos) {
186
- var h, range, x, y;
186
+ var h, range, textRange, x, y;
187
187
 
188
- range = this.domInputor.createTextRange();
188
+ textRange = this.domInputor.createTextRange();
189
189
  if (pos) {
190
- range.move('character', pos);
190
+ textRange.move('character', pos);
191
+ } else {
192
+ range = document.selection.createRange();
193
+ textRange.moveToBookmark(range.getBookmark());
191
194
  }
192
- x = range.boundingLeft + $inputor.scrollLeft();
193
- y = range.boundingTop + $(window).scrollTop() + $inputor.scrollTop();
194
- h = range.boundingHeight;
195
+ x = textRange.boundingLeft + this.$inputor.scrollLeft();
196
+ y = textRange.boundingTop + $(window).scrollTop() + this.$inputor.scrollTop();
197
+ h = textRange.boundingHeight;
195
198
  return {
196
199
  left: x,
197
200
  top: y,
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Atwho
3
3
  module Rails
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-atwho-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichord
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-10 00:00:00.000000000 Z
11
+ date: 2013-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -87,3 +87,4 @@ summary: 'jquery plugin: @mentions'
87
87
  test_files:
88
88
  - spec/generators/install_generator_spec.rb
89
89
  - spec/spec_helper.rb
90
+ has_rdoc: