-
Notifications
You must be signed in to change notification settings - Fork 161
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
Image.getAlt() not working if alt text set by constructor #15756
Comments
Thanks @Artur- Your commit looks good. |
This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version. |
Can this fix be added to Vaadin 23? |
@craigwebb-xft sorry for a late answer, unfortunately we got no notifications of this issue updates, so missed your request. Anyway, I've triggered a cherry pick of this fix into Flow 23.3 series, so hopefully this will be merged soon and released in the next maintainance patch. |
This ticket/PR has been released with Vaadin 23.3.26. |
Description of the bug
Create a new Image with alt text:
Image image = new Image( "http://www.something.com" , "Some Alt Text" )
Then test getAlt():
assertEquals( "Some Alt Text" , image.getAlt().get() )
throws a java.util.NoSuchElementException: No value present
Related to the change for #14880
If setAlt() is used, then getAlt() works correctly.
I would expect setting the Alt text to be the same whether the constructor is used or the setAlt() is used.
Expected behavior
getAlt() should return the alt text, regardless of whether the constructor or the setAlt() was used.
Minimal reproducible example
See description of the bug
Versions
The text was updated successfully, but these errors were encountered: