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
iOS: Fixed Toolbar and North Container Become Blank While Scrolling a Separate Center Container
Description
On a physical iOS device, scrolling a container placed in the BorderLayout.CENTER position can cause the fixed content above it to stop painting.
The affected area includes:
The Form toolbar and title
Back and overflow menu icons
A non-scrollable container in BorderLayout.NORTH
The components are still present and interactive. For example, the invisible back button and overflow menu button can still be pressed. Opening the overflow menu forces the missing toolbar and North container to repaint and become visible again.
The issue does not occur on:
Android devices
The Codename One simulator using Android or iOS skins
This behaviour was not present in previous versions of the application/Codename One.
Expected Behaviour
The toolbar and North container should remain visible while the independently scrollable Center container is scrolled.
Actual Behaviour
During or after scrolling:
The toolbar becomes blank.
The North container becomes blank.
The components remain clickable.
Opening the overflow menu causes the fixed areas to reappear.
Build and install the test application on a physical iOS device.
Open the iOS repaint test page.
Leave the page in Mode 0.
Repeatedly scroll the Center list up and down.
Watch the toolbar and fixed coloured North area.
If they become blank, press the location where the overflow menu icon should be.
Observe that the overflow menu opens and the missing fixed content is repainted.
Repeat the test using Modes 1, 2 and 3 for comparison.
The issue may be intermittent, so scrolling up and down several times may be required. Also note mode 2 will appear to resolve the issue however repeated scrolling can cause a visible flicker in the fixed areas.
Workaround Tested
Adding a scroll listener and repainting the fixed components reduces or prevents the problem:
However, using manual repaint calls during scrolling can produce occasional flickering in the original, more complex page. Therefore, this does not appear to be an ideal production solution.
Additional Observations
The missing components continue to receive pointer events.
No components are deliberately hidden or removed while scrolling.
Opening the overflow menu consistently triggers a successful repaint.
Repainting only the North container does not always restore the toolbar.
Repainting the complete title area and North container works in the test case, however causes a flicker on the fixed areas.
The attached video demonstrates the behaviour and compares the available repaint modes.
Title
iOS: Fixed Toolbar and North Container Become Blank While Scrolling a Separate Center Container
Description
On a physical iOS device, scrolling a container placed in the
BorderLayout.CENTERposition can cause the fixed content above it to stop painting.The affected area includes:
BorderLayout.NORTHThe components are still present and interactive. For example, the invisible back button and overflow menu button can still be pressed. Opening the overflow menu forces the missing toolbar and North container to repaint and become visible again.
The issue does not occur on:
This behaviour was not present in previous versions of the application/Codename One.
Expected Behaviour
The toolbar and North container should remain visible while the independently scrollable Center container is scrolled.
Actual Behaviour
During or after scrolling:
Original Application Structure
The original page uses:
The Form content pane itself is not scrollable. Only the Center container scrolls.
The North container originally contained an image and a label. The reduced test case replaces the image with a simple fixed-height coloured component.
Test Case
public void showIosRepaintTestForm(Form mainForm) {
Form form = new Form("iOS Repaint Test", new BorderLayout());
}
BorderLayout.NORTHBorderLayout.CENTERThe modes are:
Mode 0 represents the page without a workaround.
Mode 1 was tested because repainting the North container restores it, but the toolbar may remain blank.
Mode 2 calls:
This successfully keeps both fixed areas visible in the test case however cause a flicker in the fixed areas.
Mode 3 repaints the complete fixed header region using:
Steps to Reproduce
The issue may be intermittent, so scrolling up and down several times may be required. Also note mode 2 will appear to resolve the issue however repeated scrolling can cause a visible flicker in the fixed areas.
Workaround Tested
Adding a scroll listener and repainting the fixed components reduces or prevents the problem:
However, using manual repaint calls during scrolling can produce occasional flickering in the original, more complex page. Therefore, this does not appear to be an ideal production solution.
Additional Observations
Video.mov