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

MaterialAutoComplete type=TEXT throws an exception in demo #61

Closed
ratuka opened this issue Apr 27, 2016 · 6 comments · Fixed by #152
Closed

MaterialAutoComplete type=TEXT throws an exception in demo #61

ratuka opened this issue Apr 27, 2016 · 6 comments · Fixed by #152

Comments

@ratuka
Copy link

ratuka commented Apr 27, 2016

http://gwtmaterialdesign.github.io/gwt-material-demo/#!autocomplete

scroll to the TYPE TEXT example, click on the textbox, than type L, select the first suggestion, than see the console for the error

chrome
ff
ie11

@kevzlou7979 kevzlou7979 added this to the 1.5.1 milestone Apr 27, 2016
@kevzlou7979
Copy link
Contributor

@ratuka Thanks I confirmed the bug exists

@BenDol
Copy link
Contributor

BenDol commented May 23, 2016

Has this been resolved?

@kevzlou7979 kevzlou7979 modified the milestones: 1.6.0, 1.5.1 Jun 2, 2016
@ratuka
Copy link
Author

ratuka commented Aug 1, 2016

Unfortunately not. Even in the latest 1.6.0 snapshot it throws "uncaught exception: com.google.gwt.event.shared.UmbrellaException: Exception caught: This widget's parent does not implement HasWidgets"

@kevzlou7979 kevzlou7979 modified the milestones: 2.0, 1.6.0 Aug 19, 2016
@kevzlou7979 kevzlou7979 removed this from the 2.0 milestone Oct 30, 2016
@ingosch
Copy link

ingosch commented Nov 2, 2016

I've traced this error down but I'm not sure how to fix it.
MaterialAutoComplete uses GWT SuggestBox and injects it's own TextBox into it. SuggestBox doesn't implement HasWidgets interface, so the TextBox can't be removed from it later.
But that's what happens when an item is added in "TEXT"-Mode (MaterialAutoComplete Line 353). MaterialAutoComplete tries to add the Box to a ListItem what causes the Box's "removeFromParent" function (of Widget class) to be called.
This Exception is also thrown when setting the SuggestOracle a second time, cause the TextBox is only instantiated once as an instance variable and reused while the SuggestBox is created new.

@BenDol
Copy link
Contributor

BenDol commented Nov 3, 2016

The TextBox shouldn't be reattaching itself in the display item. Will submit the fix tonight.

BenDol added a commit that referenced this issue Nov 3, 2016
@kevzlou7979
Copy link
Contributor

@BenDol Nice one

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

Successfully merging a pull request may close this issue.

4 participants