gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.53k stars 377 forks source link

Make Popup aware of screen dimensions #7901

Open dankurka opened 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 7904

Found in GWT Release (2.5.0)

On a small display, often the DatePicker popup is out of view.  Because the popup member
is private, there is not way to call element.scrollIntoView()

Workaround if you have one:

Make PopupPanel panel protected or add a protected accessor, and in a subclass override
onEnterDown
    @Override
    protected void onEnterKeyDown(Context context, Element parent, Date value, NativeEvent
event, ValueUpdater<Date> valueUpdater) {   
    super.onEnterKeyDown(context, parent, value, event, valueUpdater);
        getPopupPanel().getElement().scrollIntoView();
    }

or make this the default behavior for the popup in the DatePickerCellClass

Reported by steven@spungin.tv on 2013-01-18 19:16:17

dankurka commented 9 years ago

Reported by dankurka@google.com on 2013-05-28 03:42:44