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
Fixxes display of SiteUrl placeholder #13036
Conversation
There are a lot of tests failing and some very strange screenshots especially this two: https://builds-artifacts.matomo.org/matomo-org/matomo/3.x-dev/28135/UIIntegrationTest_dashboard1.png I'm pretty sure this has nothing to do with me, but I will not sync my screens until this is worked out. But please explain this: https://builds-artifacts.matomo.org/matomo-org/matomo/3.x-dev/28135/MeasurableManager_add_measurable_view.png How could the thing I fixxed be already expected and why is it getting rendered wrong? Just to be clear here: This fix is against the W3C standard HTML 5.2 from December 2017! As it clearly states:
Source: https://www.w3.org/TR/html5/forms.html#the-placeholder-attribute I tested this change successfully in: IE11, FF60, Chrome 66 |
I can explain this: It is already working correctly with the spaces if the windows is narrow enough. |
Thanks for creating this PR @fdellwing! Looks like the reason it fails in phantomjs is because it doesn't work in webkit. See, eg, this screenshot in Safari: Also, I'm not sure if |
Thats bad news, then there is not really a nice way to do this. I would suggest using JS to write the placeholder into the field and removing it if the input gets focus. Sadly I do not have time for this atm. You can decline this PR if you are more happy with the current version. |
@fdellwing What about the more hackish solution of just adding more spaces and replacing the domain with an |
Thats not hackish but simple ugly, but yes, I could do that. |
also replace `.invalid` with `.example`
I just tripled the current spaces for now, can someone check this with an UHD resolution? For 4k we would need even more I think. |
As we are building those inputs with angular based on the definitions, I'm wondering if we maybe should do the required magic for safari in angular. Afaik all other modern browsers are able to show the newline in textareas. So maybe we could implement a check in JS if the browser "supports" it or not. And if not, replace the newline with whitespaces. |
I have no clue of angular, so sadly you have to do that yourself. |
fixes #13035