@percy/dom 1.28.3-beta.0 → 1.28.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +10 -0
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -19,6 +19,16 @@
19
19
  switch (elem.type) {
20
20
  case 'checkbox':
21
21
  case 'radio':
22
+ /*
23
+ here we are removing the checked attr if present by default,
24
+ so that only the current selected radio-button will have the checked attr present in the dom
25
+ this happens because in html,
26
+ when the checked attribute is present in the multiple radio-buttons for which only one can be selected at a time,
27
+ the browser will only render the last checked radio-button by default,
28
+ when a user selects any particular radio-button, the checked attribute on other buttons is not removed,
29
+ hence sometimes it shows inconsistent state as html will still show the last radio as selected.
30
+ */
31
+ cloneEl.removeAttribute('checked');
22
32
  if (elem.checked) {
23
33
  cloneEl.setAttribute('checked', '');
24
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/dom",
3
- "version": "1.28.3-beta.0",
3
+ "version": "1.28.3-beta.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "interactor.js": "^2.0.0-beta.10"
37
37
  },
38
- "gitHead": "4f68901eae5d818f24940acb397d1c3f4c0182e5"
38
+ "gitHead": "3a838eedd0f07f57c6c61cd0cba1c7e20cc95af3"
39
39
  }