-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add more checks to determine if element is non-static (#15259)
Fixes #15241
- Loading branch information
1 parent
073f4d8
commit 575900d
Showing
7 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: ensure input elements and elements with `dir` attribute are marked as non-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/svelte/tests/hydration/samples/element-dir-attribute-sibling/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
test(assert, target) { | ||
const p = target.querySelector('p'); | ||
|
||
assert.equal(p?.dir, 'rtl'); | ||
} | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/svelte/tests/hydration/samples/element-dir-attribute-sibling/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p dir="rtl">text</p>. |
9 changes: 9 additions & 0 deletions
9
packages/svelte/tests/hydration/samples/input-checked-attribute-sibling/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
test(assert, target) { | ||
const input = target.querySelector('input'); | ||
|
||
assert.equal(input?.checked, true); | ||
} | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/svelte/tests/hydration/samples/input-checked-attribute-sibling/_expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!--[--><!---->.<input><!--]--> |
1 change: 1 addition & 0 deletions
1
packages/svelte/tests/hydration/samples/input-checked-attribute-sibling/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.<input checked /> |