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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changed
WInput: tap-to-focus and onTap dispatch now flow through Flutter's native TextSelectionGestureDetectorBuilder (the same gesture path TextField uses) instead of a hand-built whole-box GestureDetector. onTap continues to fire when the user taps the field; the change is the gesture mechanism (which also brings drag-select and double-tap word selection), not a new onTap contract.
Fixed
WInput now supports native text selection: mouse drag-select, double-tap word, and long-press all work again. The Material-free rewrite (#106) had dropped the selection gesture layer, so only keyboard select-all (CTRL+A) worked and dragging on web selected nothing. The field now uses the framework's canonical selectable-input recipe (the one CupertinoTextField uses): _WInputState implements TextSelectionGestureDetectorBuilderDelegate, the whole decorated box is wrapped by a TextSelectionGestureDetectorBuilder (so a tap anywhere focuses and a drag over the glyphs selects), and EditableText.rendererIgnoresPointer is true so the gesture layer is the only pointer handler. Selection handles stay Cupertino-style on all platforms (unchanged from 1.1.0), keeping WInput cupertino-only with no package:flutter/material.dart import; cupertinoTextSelectionHandleControls mixes in TextSelectionHandleControls, so the toolbar still flows through the Material-free contextMenuBuilder and no Overlay-less long-press throws. Read-only fields stay selectable; disabled fields stay fully inert. (lib/src/widgets/w_input.dart; covered by test/widgets/w_input/selection_test.dart.)
WText with no color in its own className now inherits an ancestor DefaultTextStyle color (the CSS text-color cascade) before falling back to the platform-brightness baseline. A parent WDiv with a text-* class publishes its color through DefaultTextStyle.merge, but WText previously ignored it and forced Colors.white/Colors.black from the OS platform brightness. That made colorless text vanish whenever the app theme disagreed with the OS theme: a secondary/outline button whose text color lives on the container (e.g. a dialog Cancel button) rendered an invisible label in a light app theme on a dark-mode OS. The brightness-aware baseline still applies only when no ancestor supplies a color (bare text with no Material ancestor), preserving the no-yellow-underline guarantee. (lib/src/widgets/w_text.dart; covered by WText baseline rendering > inherits an ancestor color (CSS cascade).)