poltergeist 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Poltergeist - A PhantomJS driver for Capybara #
2
2
 
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
 
5
5
  [![Build Status](https://secure.travis-ci.org/jonleighton/poltergeist.png)](http://travis-ci.org/jonleighton/poltergeist)
6
6
 
@@ -286,6 +286,13 @@ Include as much information as possible. For example:
286
286
 
287
287
  ## Changes ##
288
288
 
289
+ ### 1.0.2 ###
290
+
291
+ #### Bug fixes ####
292
+
293
+ * Clearing the value before setting a new value by sending a backspace.
294
+ This fixes the issue that you can't set an empty value. [Issue #184]
295
+
289
296
  ### 1.0.1 ###
290
297
 
291
298
  #### Bug fixes ####
@@ -69,6 +69,7 @@ Poltergeist.Node = (function() {
69
69
 
70
70
  Node.prototype.set = function(value) {
71
71
  this.focusAndHighlight();
72
+ this.page.sendEvent('keypress', 16777219);
72
73
  this.page.sendEvent('keypress', value.toString());
73
74
  return this.blur();
74
75
  };
@@ -54,5 +54,8 @@ class Poltergeist.Node
54
54
 
55
55
  set: (value) ->
56
56
  this.focusAndHighlight()
57
+ # Sending backspace to clear the input
58
+ # keycode from: https://github.com/ariya/phantomjs/commit/cab2635e66d74b7e665c44400b8b20a8f225153a#L0R370
59
+ @page.sendEvent('keypress', 16777219)
57
60
  @page.sendEvent('keypress', value.toString())
58
61
  this.blur()
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Poltergeist
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poltergeist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-15 00:00:00.000000000 Z
12
+ date: 2012-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara
@@ -261,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  segments:
263
263
  - 0
264
- hash: 4082965460771715410
264
+ hash: 2316143508093887308
265
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  none: false
267
267
  requirements:
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  segments:
272
272
  - 0
273
- hash: 4082965460771715410
273
+ hash: 2316143508093887308
274
274
  requirements: []
275
275
  rubyforge_project:
276
276
  rubygems_version: 1.8.24