-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
A few bugs with version v0.97.0 #1690
Comments
Oh my God I thought I was doing something wrong with the error label spanning over multiple lines. Thanks for not just reporting the bugs but also providing solutions to them! |
Here is a hack to fix the third issue. Waiting for those errors to be solved! |
@najubhai You are very welcome :) @Clemzd That will work nicely and it is probably a cleaner way to do it ! However, I try not to use JS when an HTML solution exists :) Yep, can't wait for those issues to be fixed, especially that of the errors not displayed on date picker input fields. |
@gempain Native HTML solutions are always the best! Except when the HTML code is already written =) |
@Clemzd what do you mean ?
|
@gempain I was saying this hack is better than alterate the HTML code. I think that placeholder="" is not a good practise. And oh my bad, this solution does not work anyway
|
@Clemzd I agree with you, using Assuming input is empty, you need to differentiate two states:
The solution should only modify 1.B. |
Yes, you're 100% correct. I don't really need this effect that's why this fix is enough for me for now. I am using this framework at work for a project so I don't have lot of time to spend on fixing bugs. |
Same thing here :) I don't have much time to work on fixing these bugs ^^ I hope they'll find a solution soon :) |
For me width 100% does not fix the issue with the error messages mentioned in point 4. label[data-error]:after { |
This fixes the input error for me somewhat, the only problem is it still displays an effect when giving the input focus.
|
@marcl2020 have you tried adding @derixithy I'll git it a try if I get some time at work today :) I might just try to find the right fix :) Anyone has an idea on the date picker errors not showing ? That's the strangest one to me :/ |
@gempain no haven't tried adding it, going to check later if it works. |
@marci2020 Your solution works for me ! I also noticed a bug cause by my solution: it breaks the width of input[type=search]. The corresponding label has a padding, therefore its outer width is 100% + padding, which exceeds the width of the div, creating an x scroll... So I'll change my solution to yours in my original post. Thanks for providing it ! |
@gempain point 5 can be solved by adding "col" class to every element with "input-field" |
@marci2020 That works gracefully ! I'll update the list. However, I am not a fan of such solutions as I believe that it adds unnecessary tags to the page, that becomes unreadable, although I agree that your solution follows the philosophy of the Materialize framework :) Actually, in my current pages, |
Error mentioned in point 7 also happens with Chrome |
@marci2020 what is your Chrome version ? (so I can update correctly). |
@gempain it's 43.0.2357.134 |
@marci2020 Thanks, updated :) |
For point 6 check: The error message will get into place once a value is selected. |
My-Workaround: .input-field label[data-error].active:after
font-size: 0.8rem
-webkit-transform: none
-moz-transform: none
-ms-transform: none
-o-transform: none
transform: none
.input-field label[data-error]:after
font-size: 0.8rem
white-space: nowrap
-webkit-transform: translateY(-120%)
-moz-transform: translateY(-120%)
-ms-transform: translateY(-120%)
-o-transform: translateY(-120%)
transform: translateY(-120%)
form
.row
.col.s12
margin-bottom: 15px It seems that this issue is difficult. |
IMO, all these work around solutions are fine and do actually work. Although I would suggest a different approach. I use this framework within different .NET MVC application. Having a required Attribute is a common thing. Therefore, when returning a view, as mentioned before, if the input has no focus the data-error is misplaced. So here is what I suggest, we could use an extra markup to serve as the container for the validation error message. Basically, adding a span below the input to hold the text is a clean plain html solution and will most likely be more compatible with other web framework (ie MVC uses unobstructive JavaScript which normally display the error in a span below the field. The span will automatically fill 100% of the width and should use display:block. People who download the source could easily modify the class name applied to the span to match their need (ie: Again, for a MVC user, the class name could be changed for the one used with unobstuctive JavaScript to match existing or custom JavaScript selectors. Pseudo element are great in general. Although, I am not a great fan of the approach used to display validation errors. |
Some of these CSS workarounds work great, but generally apply to inputs. When using textareas, because they dynamically grow, I'm still getting an overall between the error message and the text area content. |
For point 3 you can use |
6 Edit: Workaround for 7 (working in Chrome 52.0.2743.116). For some reason (haven't dug that deep), but it still thinks the datepicker input is the active element on the page, so when the window regains focus, it displays the datepicker. (This can be proven out by interacting with anything else on the page, then switching tabs the same way as originally described by OP). Not sure if this is the most efficient way to handle this, but it works. Just add the following to the $('.datepicker').pickadate({
onClose: function () {
$(document.activeElement).blur();
}
}); |
Is there any workaround/fix for issue6? (data-error with datepicker). |
issue number 6 just been fix recently by @Dogfalo |
I'm still seeing issue #3 - I'm using 0.99.0 from CDN: I take it not all of these issues have been corrected? |
In v1-dev, we've overhauled the label system so that is the error messages do no move inadvertently with the primary label. |
@Dogfalo Do you know in which release this overhaul will be included? |
1.0.0 |
I put the following workaround in my CSS to wrap the text when I specified and when it needed to in my Angular 2 app.
It allowed me to fill my data-error property with the following
which then displayed the error how I wanted (image attached). |
Hi,
Probably the most amazing css/js framework I have seen so far, so I thought you would appreciate some feedback about several issues I have found.
Setup
Materialize v0.97.0
Safari 8.0.6
Issues
When a date picker is applied to an input field inside a
![placeholder_overlapping](https://camo.githubusercontent.com/ba4aa79d498998b55e648994ea0ed5d3f07305a87b3bb40341aaee27981b3617/687474703a2f2f7332382e706f7374696d672e6f72672f367970676a3878396c2f436170747572655f645f6372616e5f323031355f30375f30375f31355f30365f33352e706e67)
<div class="input-field"></div>
, the placeholder should move up (respectively down) when the picker opens (respectively closes).IMHO, even though it is not part of the range slider components of Google Material Design, Materialize should provide a double range slider.
Input error is misplaced when input has no value, most likely because of the placeholder . It only displays correctly when the placeholder slides up.
Default
Workaround
Result
Long error messages will span over several lines and break the design.
Default
Workaround
provided by @marci2020
Result
IMHO, when several inputs are stacked, inputs below are too close to the error message.
Default:
Workaround
provided by @marci2020
Adding "col" class to every element with "input-field" class and putting it into an element with class "row" (like done on Materialize form examples).
Result
Error messages (from
data-error
) are not displayed on inputs with thedatepicker
class.Close a date picker, switch browser tab, come back to the previous tab and the picker reopens. Bug has been reported on Safari (8.0.6) and Chrome (43.0.2357.134).
Looking forward to reading you.
Cheers, and keep the amazing work !
The text was updated successfully, but these errors were encountered: