Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-28459

View should add a resizeForSoftKeyboard flag for finer-grained control of resize behavior

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Later
    • Adobe Flex SDK Previous
    • None
    • Mobile: ViewNavigator
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Other (specify version)
      Language Found: English

    Description

      The new SkinnablePopUpContainer Soft Keyboard Effect feature changes the Application.resizeForSoftKeyboard from true to false by default. Text-form use cases and alternative solutions copied below from the feature spec.

      Applications that require resizing must now change resizeForSoftKeyboard to true in the main application file or change it incrementally as needed.

      This enhancement requests that a new resizeForSoftKeyboard property be added to the View container. A View-specific resize option would allow finer-grained for view-based applications. Without this control, the likely path is to set FlexGlobals.topLevelApplication.resizeForSoftKeyboard in the current view. Users would need to remember to undo this change when the view is deactivated.

      Text-from use case:
      =============
      The main reason for resizing the application was to support the text form use case. The problem was that the user could not manually scroll to content underneath the soft keyboard because the Scroller reached its scroll bounds. For simplicity sake, let's take an example of a single TextArea that is the height of the application. This TextArea is contained inside of a Scroller. When the soft keyboard is closed, you can see the entire TextArea. The Scroller won't scroll because the TextArea fits inside of the Scroller's viewable area. If the soft keyboard doesn't resize when the soft keyboard comes up, the soft keyboard will cover the bottom half of the TextArea, therefore, the user will still not be able to scroll the Scroller because the Scroller considers the viewable area to be the entire application and thus won't allow scrolling.
      The other use case is for the caret position in a TextArea. When the softKeyboard comes up, we want to ensure that the caret is scrolled into view. I think we still run into problems if the TextArea is taller than the viewable area when the softKeyboard is up. The user will never be able to manually scroll to view the bottom of the TextArea.

      Alternatives to changing the Application default
      =============================
      1. Keep the existing Application default as true. Both the application and pop-up would resize by default.
      Results in excess resizing for Callout when it's owner is a TextInput.
      2. Keep the existing Application default as true and allow SkinnablePopUpContainer to side-affect the Application's setting with a temporary override.
      Results in desired behavior for text-forms and pop-ups, but the API is difficult to understand. Side-affect properties are discouraged.
      3. (Decision) Change the existing Application default to false. The application does not resize by default.
      Results in desired pop-up behavior but breaks backward compatibility. Also, applications that require Application.resizeForSoftKeyboard=true for the text-form use case must now either opt-in globally (less discoverable) or opt-in incrementally (even less discoverable).
      4. Change the existing Application default to false and allow SkinnablePopUpContainer to side-affect the Application's setting with a temporary override.
      Same as previous, but with the added drawback of a confusing API and side-affected property.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: