Skip to content

Conversation

@asamuzaK
Copy link
Contributor

@asamuzaK asamuzaK marked this pull request as draft March 12, 2025 09:19
@asamuzaK asamuzaK changed the title Remove designMode from read-only read-write Fix read-only read-write handler Mar 12, 2025
@asamuzaK
Copy link
Contributor Author

Not sure where to add this, but here's a test in wpt format.

<!DOCTYPE html>
<title>3816</title>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- Regression test for https://github.com/jsdom/jsdom/issues/3816 -->

<input id="input0" />
<input id="input1" readonly="" />
<input id="input2" readonly="readonly" />

<script>
"use strict";
const input0 = document.getElementById('input0');
const input1 = document.getElementById('input1');
const input2 = document.getElementById('input2');

test(() => {
  assert_false(input0.matches(':read-only'));
  assert_true(input0.matches(':read-write'));
}, 'no readonly attr');

test(() => {
  assert_true(input1.matches(':read-only'));
  assert_false(input1.matches(':read-write'));
}, 'readonly attr with empty string');

test(() => {
  assert_true(input2.matches(':read-only'));
  assert_false(input2.matches(':read-write'));
}, 'readonly attr with value');
</script>

@asamuzaK asamuzaK marked this pull request as ready for review March 12, 2025 10:55
@asamuzaK
Copy link
Contributor Author

link to wpt

@dperini dperini merged commit 8eef269 into dperini:master Mar 18, 2025
@asamuzaK asamuzaK deleted the read branch March 18, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

querySelector fails to find input:read-only after updating from v25.0.1 to v26

2 participants