Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date picker closes itself #752

Closed
jzaruba opened this issue Dec 14, 2017 · 6 comments
Closed

date picker closes itself #752

jzaruba opened this issue Dec 14, 2017 · 6 comments
Assignees
Labels

Comments

@jzaruba
Copy link
Contributor

jzaruba commented Dec 14, 2017

@Override
public void onModuleLoad() {
	RootPanel main = RootPanel.get("main");
	main.add(new MaterialDatePicker());
	main.add(new MaterialTextBox());
	MaterialTextBox password = new MaterialTextBox();
	password.setType(InputType.PASSWORD);
	main.add(password);
}

...this, together with Chrome pre-populating the inputs with previously stored credentials creates circumstances under which clicking the "Next month" or the "Previous month" arrow hides the date picker.
When I open the page in the incognito mode (i.e. no credentials get auto-entered) the date picker behaves correctly.

Inspecting the page revealed that for some reason focus gets called on the username input, which then leads to the damned close event getting triggered on the date picker.

I have been experiencing this also with another form that contained no password inputs. The login inputs were present in the DOM though, just hidden (after successful sign-in)... I am still trying to narrow that one down.

Not sure it can play any role in anything, but I also noticed that "close" gets called on an already closed date picker when you move focus from the date input to another widget.

@jzaruba
Copy link
Contributor Author

jzaruba commented Dec 14, 2017

OK, tested the previously mentioned other form, this time making sure the login inputs are not present in the DOM. And indeed the issue does not occur.
Chrome credentials auto-filling seems to be the culprit.

@kevzlou7979
Copy link
Contributor

Ok I'll check this out tomorrow including some bugs need to be fixed on 2.0.1-SNAPSHOT.

@kevzlou7979 kevzlou7979 self-assigned this Dec 15, 2017
@kevzlou7979 kevzlou7979 added this to the 2.0.1 milestone Dec 15, 2017
@kevzlou7979 kevzlou7979 removed this from the 2.0.1 milestone Jan 18, 2018
@gkresic
Copy link
Contributor

gkresic commented Apr 25, 2019

Is there any workaround for this bug? I didn't noticed it earlier, but now I can witness it in Chrome 73 on both Linux and Windows.

Picker works (mostly) when date is initially unset, but closes immediately upon click when there is any input in it (popup just flashes briefly).

Screencast from demo site

@kevin-i3
Copy link

The fixed was already patched on 2.2-SNAPSHOT
#901

And demo was migrated to https://gwtmaterialdesign.github.io/gmd-core-demo/#datePicker

@washowasho
Copy link

This also looks good in 2.3-SNAPSHOT.

@kevzlou7979
Copy link
Contributor

kevzlou7979 commented Nov 9, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants