Fixes issues in Safari from using window.innerWidth. Using
documentElement.clientWidth doesn't have issues and provides a more practical
value for the canvas width that excludes the width of scrollbars.
Fix#1369Fix#1905
Replaces the old storybook with static HTML documentation and an interactive
examples app. The documentation is now easier to customize, easier to maintain,
and faster to load. The interactive examples are a dedicated Next.js app that
can be loaded and edited in codesandbox, as well as embedded in the
documentation where needed.
React Native made a breaking change to the (undocumented) I18nManager that
makes the 'isRTL' constant available via the 'getConstants' method. This
removes the getter properties that were previously needed.
When an 'href' is provided, the 'hrefAttr's prop can be used to set the 'download', 'rel', and 'target' attributes. The 'target' value does not require a "_" prefix.
* Adds "focusable" as a replacement for "accessible". This is aligned with RN for Windows.
* Remove "data-focusable" DOM attribute.
* Remove "importantForAccessibility" as this was previously deprecated.
* Remove undocumented "disabled" prop; replaced with "accessibilityDisabled"
Fix#1886
React 17 changed how blur/focus events are implemented, which requires a small
change to several unit tests to ensure the relevant DOM events are dispatched.
The z-index must be applied to the outer element (or even the portal element)
if the portal is to stack relative to other silbings. Previously, the z-index
was only relative to the outer Modal element which had a non-static position.
Fix#1820
This fixes a bug in the negotiation logic that caused a cycle of
terminate->grant events to be sent to the current responder during a pointer
move. The root cause was using an incorrect event path in the calculation of
the lowest common ancestor's index. The fix is to ensure that the event path
stored with the current responder is pruned to begin with the node that is the
current responder (rather than any child responders it may have contained).
If a pan interaction has taken place, it is not expected that 'click' events
occur on the target element when the pointer is released (as was occuring with
mouse pointers). This patch cancels any 'click' that occurs within the pan
target's subtree, within 250ms of the pan gesture ending.
Fix#1788
If a pressable is disabled it should not prevent the propagation of native
'click' events, unless the underlying DOM node has an 'aria-role' of 'button'.
This emulates the native '<button>' behavior.
Fix#1781
This patch ports the 'useHover' hook to React Native for Web, providing hover
state that is scoped to a pressable and does not bubble to ancestor pressables.
This behavior aligns with the behavior of the focus and press states.
Fix#1708
React Native has an implementation of flexbox that does not quite follow the
W3C spec for flexbox. Previously, React Native for Web attempted to replicate
the React Native rendering by setting flexBasis to 0%. However, this created
its own problems where views could collapse down to 0px in height on the web.
This patch relies sets the default flexBasis back to 'auto'. This will cause
different rendering inconsistencies with React Native, which can be addressed
by making changes to existing React Native styles. And ultimately, it is up to
Yoga to correct its flexbox implementation.
Fix#1640Fix#1604Fix#1264Close#1265
Ensure internal refs are called before the forwardedRef. This ensures that the
DOM element mutation performed by usePlatformMethods occurs before user-space
refs are called.
Ref #1749
The previous code wasn't inserting the W3C rule because it had the same selector as the rule for proprietary styles. However, the Firefox value isn't supported anymore, and the Edge value is unnecessary as Edge uses Blink now. This patch removes the non-WebKit fallback styles for this property.
Fix#1760
This patch fixes the PressResponder to avoid propagating click and contextmenu
events in all circumstances. It also prevents click propagating for focusable
elements that are disabled, mirroring the behavior of native buttons when
disabled.
Fix#1757