SideeX / sideex

The Official Repository of SideeX 2
http://sideex.org
187 stars 54 forks source link

When typing in numeric fields, generates error 'Cannot set the selection end' #25

Open vtamara opened 6 years ago

vtamara commented 6 years ago

With @BlancaInesAcosta we prepared a simple example that shows the problem: https://codepen.io/blancainesacosta/full/wxQBZB/ with the following sideex test case:

open               https://codepen.io/blancainesacosta/full/wxQBZB/ 
selectFrame        index=0
clickAt            id=name         66,10
type               id=name         thename
type               id=age          33

The following picture shows the sideex output

captura de pantalla de 2018-08-13 08-07-24

The problem occurrs in input fields with the attribute type='number'. We also have seen the same problem in fields with attribute type='email'

A workaround we have been using is to remove such attribute before the command type. In this example it could be with:

runScript         document.getElementById("age").removeAttribute("type");

as the following picture presents: captura de pantalla de 2018-08-13 08-39-16

jcw778 commented 5 years ago

Did you try removing .removeAttribute("type)"

vtamara commented 5 years ago

The initial example doesn't have that, and it doesn't work. I added .removeAttribute ... as a workaround to make it work.