You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the new resize observer bindings that were released in 3.59.0. bind:borderBoxSize is working as expected, but I have not been able to get bind:contentBoxSize to work. Its value stays undefined. I've tested in Safari, Chrome, and Firefox on macOS.
I'm not familiar with the Svelte codebase, but I wonder if the issue might be in these lines:
I think the check should be regex_content_rect.test(name) || regex_content_box_size.test(name). The regex test() method returns either true or false. The righthand side of ?? is only evaluated if the lefthand side is null or undefined, which can't happen here. I would be happy to submit a PR if this is the fix.
Reproduction
REPL demo showing that bind:borderBoxSize works, but bind:contentBoxSize does not.
Describe the bug
I am trying to use the new resize observer bindings that were released in 3.59.0.
bind:borderBoxSize
is working as expected, but I have not been able to getbind:contentBoxSize
to work. Its value stays undefined. I've tested in Safari, Chrome, and Firefox on macOS.I'm not familiar with the Svelte codebase, but I wonder if the issue might be in these lines:
I think the check should be
regex_content_rect.test(name) || regex_content_box_size.test(name)
. The regextest()
method returns either true or false. The righthand side of??
is only evaluated if the lefthand side is null or undefined, which can't happen here. I would be happy to submit a PR if this is the fix.Reproduction
REPL demo showing that
bind:borderBoxSize
works, butbind:contentBoxSize
does not.Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: