recordselect 3.1.9 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -316,8 +316,8 @@ RecordSelect.Abstract = Class.extend({
316
316
  text_field.keyup($.proxy(this, 'onkeyup'));
317
317
 
318
318
  // keyboard navigation, if available
319
- if (this.onkeypress) {
320
- text_field.keypress($.proxy(this, "onkeypress"));
319
+ if (this.onkeydown) {
320
+ text_field.keydown($.proxy(this, "onkeydown"));
321
321
  }
322
322
  },
323
323
 
@@ -337,7 +337,7 @@ $.extend(RecordSelect.Abstract.prototype, {
337
337
  /**
338
338
  * keyboard navigation - where to intercept the keys is up to the concrete class
339
339
  */
340
- onkeypress: function(ev) {
340
+ onkeydown: function(ev) {
341
341
  var elem;
342
342
  switch (ev.keyCode) {
343
343
  case 38: //Event.KEY_UP
@@ -240,7 +240,7 @@ RecordSelect.Abstract = Class.extend({
240
240
  this.container.show();
241
241
  this.container.css('left', offset.left);
242
242
  if (top + this.container.height() > $(window).height())
243
- this.container.css('bottom', offset.top);
243
+ this.container.css('bottom', $(window).height() - offset.top);
244
244
  else this.container.css('top', top);
245
245
 
246
246
  if (this._use_iframe_mask()) {
@@ -337,7 +337,7 @@ $.extend(RecordSelect.Abstract.prototype, {
337
337
  /**
338
338
  * keyboard navigation - where to intercept the keys is up to the concrete class
339
339
  */
340
- onkeypress: function(ev) {
340
+ onkeyup: function(ev) {
341
341
  var elem;
342
342
  switch (ev.keyCode) {
343
343
  case 38: //Event.KEY_UP
@@ -187,8 +187,8 @@ Object.extend(RecordSelect.Abstract.prototype, {
187
187
  }.bind(this));
188
188
 
189
189
  // keyboard navigation, if available
190
- if (this.onkeypress) {
191
- text_field.observe('keypress', this.onkeypress.bind(this));
190
+ if (this.onkeydown) {
191
+ text_field.observe('keydown', this.onkeydown.bind(this));
192
192
  }
193
193
  },
194
194
 
@@ -206,7 +206,7 @@ Object.extend(RecordSelect.Abstract.prototype, {
206
206
  /**
207
207
  * keyboard navigation - where to intercept the keys is up to the concrete class
208
208
  */
209
- onkeypress: function(ev) {
209
+ onkeydown: function(ev) {
210
210
  var elem;
211
211
  switch (ev.keyCode) {
212
212
  case Event.KEY_UP:
@@ -107,7 +107,7 @@ Object.extend(RecordSelect.Abstract.prototype, {
107
107
  show: function() {
108
108
  var offset = Position.cumulativeOffset(this.obj),
109
109
  top = Element.getHeight(this.obj) + offset[1],
110
- window_height = document.viewport.getDimensions().height;
110
+ window_height = document.viewport.getHeight();
111
111
  this.container.style.left = offset[0] + 'px';
112
112
  if (top + Element.getHeight(this.container) > window_height)
113
113
  this.container.style.bottom = (window_height - offset[1]) + 'px';
@@ -1,8 +1,8 @@
1
1
  module RecordSelect
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 1
5
- PATCH = 9
4
+ MINOR = 2
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recordselect
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 1
9
- - 9
10
- version: 3.1.9
8
+ - 2
9
+ - 0
10
+ version: 3.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Cambra