question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot click on 'readonly' inputs / textarea

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
jackwestmoretabcommented, Aug 19, 2019

Hey, any update on when this change will be merged in? 😃

4reactions
prashantabelladcommented, Aug 2, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make HTML Input Area Readonly but Selectable
I'm trying to get the glowing border to still show up when you click it but make the text inside uneditable. <input style='border:none; ......
Read more >
HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >
Using HTML readonly attribute for <textarea> tag
readonly elements can be focused by clicking the element, while disabled elements can't be clicked at all; When navigating input elements using ...
Read more >
Allow to select text on readonly input - Smart UI Components
Hi, I want to create a readonly input field, but allow the user to select+copy text in it (like it's possible is in...
Read more >
HTML textarea readonly Attribute - W3Schools
The readonly attribute is a boolean attribute. When present, it specifies that a text area should be read-only. In a read-only text area,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found