Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5301

iOS: iPad Table View w/ Cuts Text Field Off Screen

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: Release 1.7.2, Release 1.8.0, Release 3.2.0, Release 3.2.1
    • Fix Version/s: Sprint 2011-37, Release 1.8.0
    • Component/s: iOS
    • Environment:
    • Story Points:
      1
    • Sprint:
      2020 Sprint 1

      Description

      Problem

      A table view with a text field doesn't size properly to account for the keyboard in portrait orientation. This will be easier to see in practice, so please take a look at the example.

      Example

      Perform the following steps:

      1. Drop the following code in an app.js, and run it in the iPad simulator.
      2. The app automatically focuses the last text field in the table view, popping up the keyboard.
      3. Verify that you can see the text field, and everything looks as it should.
      4. Now scroll to the top of the table view.
      5. Try to scroll back down so the last text field is visible. The height of the table view is such that you cannot keep the text field on screen.

      app.js

      var win = Ti.UI.createWindow({ title: 'Focus Test', backgroundColor: '#fff' });
       
      var rows = [];
      for (var i = 0; i < 20; i++) {
          var row = Ti.UI.createTableViewRow({
              height: 40
          });
          row.add(row.textField = Titanium.UI.createTextField({
              value: 'Last row focused; Scroll up, and then try to scroll back down.',
              color: '#000',
              top: 5, right: 10, bottom: 5, left: 10,
              borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
          }));
          rows.push(row);
      }
       
      win.add(Ti.UI.createTableView({
          data: rows
      }));
       
      win.addEventListener('open', function() {
          rows[rows.length - 1].textField.focus();
      });
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerriman Eric Merriman
                Reporter:
                dtoth Dawson Toth
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-4487
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration