Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Input field with type=number cannot be set in Firefox 29 #7291

Closed
lukeis opened this issue Mar 4, 2016 · 11 comments
Closed

Input field with type=number cannot be set in Firefox 29 #7291

lukeis opened this issue Mar 4, 2016 · 11 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 7291

Before filing an issue, please read the page at
http://code.google.com/p/selenium/wiki/SeleniumHelp This contains lot of
information about how best to get help, and tells you what we need to know.

Still here? We know that bugs are frustrating and annoying things. We also
know that you've probably spent ages trying to figure out what's wrong. The
more information you give us now, the more likely it is that we'll be able
to help.

What steps will reproduce the problem?
1.Create a web page that contains <form><input id="input_number_id"  type="number"></input></form>
2.Try to send a number to the above input element via Selenium

What is the expected output? What do you see instead?
The number should be sent to the element and the element should display the number.
Instead, the number doesn't appear in the element. Sending an UP or DOWN key does set
and change the number displayed in the element.

Selenium version: 2.41.0
OS: Windows 8.1
Browser: Firefox
Browser version: 29


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

I have attached a sample HTML file.

Here's the Selenium ruby script:
url = <PUT ADDRESS OF YOUR PAGE HERE>
dr = Selenium::WebDriver.for :firefox
dr.navigate.to url
el = dr.find_element(:id, 'input_number_id')
el.send_keys "1"

Reported by janahan.EDH on 2014-05-02 01:45:25


- _Attachment: [test.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-7291/comment-0/test.html)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2014-05-04 19:08:34

  • Labels added: Browser-Firefox

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I can see the results of this bug both on FreeBSD 9.2 and on Windows 7, with tests in
RobotFramework with Selenium2Library. Input elements of type="number" are left empty
since update of FireFox to version 29.0. Selenium version: 2.41.0.

Reported by Vladimir.Chukharev on 2014-05-07 06:08:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

BTW, there is a difference in rendering the input field, at least with tag <input id="id_num_value"
name="num_value" step="any" type="number" />: ff28 shows just a plain text input field,
ff29 shows an input text field with 2 arrows for stepping the value up and down.

Reported by Vladimir.Chukharev on 2014-05-07 06:17:01

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am having the same issue on OSX 10.9.2 with firefox 29 and selenium 2.41.0


Reported by mb@trineo.co.nz on 2014-05-07 22:12:27

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

This would have broken in FF29 because FF29 is the first build of Firefox to actually
support number type input fields.

Until v29, input fields with a type of "number" would just be rendered as regular text
fields. It's only in v29 are they rendered correctly as HTML5 number inputs.

Reported by arran.huxtable on 2014-05-08 21:48:05

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Citing http://www.w3.org/TR/html5/forms.html#number-state-(type=number) :
This specification does not define what user interface user agents are to use; user
agent vendors are encouraged to consider what would best serve their users' needs.

This makes a text field perfectly correct for rendering of a number state input element,
IMHO. Particularly for one with step="any".

What is important, everything from the keyboard in FF29 works fine, user can type in
any text including non ascii, and it's is normally shown. For values which are not
suffering from a step mismatch, up and down arrows (both on keyboard and in the input
field) spin the value. For other values, arrows are ignored... To me, this looks like
cursor is not places correctly by selenium before sending the text. IMHO it's possible,
since now there exist additional sub-elements of the input field (those arrows for
spinning the value).

Reported by Vladimir.Chukharev on 2014-05-09 07:50:51

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Issue 7322 has been merged into this issue.

Reported by barancev on 2014-05-10 13:49:04

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reproduced on FF29 with synthesized events

Reported by barancev on 2014-05-10 18:16:54

  • Status changed: Accepted

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Issue 7355 has been merged into this issue.

Reported by barancev on 2014-05-15 14:35:28

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Fixed by revision afde40cbbf5c
The fix should be released in version 2.42

Reported by barancev on 2014-05-19 12:47:53

  • Status changed: Fixed
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:22:23

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant