@percy/dom 1.28.3-beta.0 → 1.28.3
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.
- package/dist/bundle.js +11 -1
- package/package.json +3 -3
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
|
}
|
|
@@ -154,7 +164,7 @@
|
|
|
154
164
|
return sheet;
|
|
155
165
|
}
|
|
156
166
|
function rewriteLocalhostURL(url) {
|
|
157
|
-
return url.replace(/(http[s]{0,1}:\/\/)localhost[:\d+]*/, '$1render.percy.local');
|
|
167
|
+
return url.replace(/(http[s]{0,1}:\/\/)(localhost|127.0.0.1)[:\d+]*/, '$1render.percy.local');
|
|
158
168
|
}
|
|
159
169
|
|
|
160
170
|
// Returns a mostly random uid.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/dom",
|
|
3
|
-
"version": "1.28.3
|
|
3
|
+
"version": "1.28.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "latest"
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/bundle.js",
|
|
15
15
|
"browser": "dist/bundle.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"interactor.js": "^2.0.0-beta.10"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "5d41045921c7ac06329c4b72caaf291d34e3f699"
|
|
39
39
|
}
|