Cypress: Cannot click on 'readonly' inputs / textarea

Created on 30 Jul 2019  路  10Comments  路  Source: cypress-io/cypress

Current behavior:

As noted initially from this comment https://github.com/cypress-io/cypress/pull/4783#issuecomment-516174805, Cypress now errors since 3.4.1 release when attempting to click on a readonly input or textarea.

Desired behavior:

Unlike an input being disabled, having a readonly attribute does not restrict clicking, focusing, selecting, or triggering events on the element. These actions should be allowed and only typing should be restricted.

Steps to reproduce: (app code and test code)

cy.get('input[readonly]`).click()

Versions

Cypress 3.4.1

pkdriver regression

Most helpful comment

Hey, any update on when this change will be merged in? :-)

All 10 comments

I updated to latest Cypress version and facing this issue of 'readonly' inputs while clicking the Calendar to select a date. When will this be resolved?

@prashantabellad We have a working PR in, so just needs review. https://github.com/cypress-io/cypress/pull/4881

Hey, any update on when this change will be merged in? :-)

Still an issue...

@Alendorff You're correct. The issue will be closed and commented on as released when this is fixed.

The code for this is done in cypress-io/cypress#4881, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Put the input inside a div and click on the div. It worked for me.

Released in 3.5.0.

Same happens in 3.5.0 :(
But only in gitlab ci, image: cypress/base:12.13.0, not on local machine :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tahayk picture tahayk  路  3Comments

brian-mann picture brian-mann  路  3Comments

zbigniewkalinowski picture zbigniewkalinowski  路  3Comments

weskor picture weskor  路  3Comments

verheyenkoen picture verheyenkoen  路  3Comments