-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Align Version button with Save / Cancel on front-end edit. #4369
Conversation
@Sophist-UK hmm it looks strange but I need to mark a unsuccessfull test. First i can't reproduce the issue with core protostar: And after the patch we indroduce a new issue. If you click the button after the patch the modal don't open. It redirect me to Can you have a look into it? |
|
Fixed. |
thanks works now @Sophist-UK |
@Sophist-UK Is rel attribute compatible with button? I mean the page still validates? http://validator.w3.org |
Yes - that may be an issue as it is not (AFAIK) officially part of the HTML spec. I have tested this in IE11 and Chrome and it works fine, but of course that doesn't guarantee it will work on other browsers or older versions of these browsers. That said, the way that we use the rel attribute on the existing tag is not according to the HTML spec anyway (which states that rel needs to be one of "alternate, author, bookmark, help, license, next, nofollow, noreferrer, prefetch, prev, search, tag" - whilst we use it to hold a JSON for the iframe). In fact the href attribute is also not part of the spec - other buttons (like Save and Cancel) use an OnClick js method (e.g. So, AFAICT the neither the existing Version tag nor my proposed alternative would validate correctly. But in practice, I think that most browsers will parse the href and rel attributes into the DOM ok, and the JS will set the same on-click event on an<a> or <button> object.
So, on the whole I think this should be OK. |
@Sophist-UK the validator tell me a error with the href attribut.
This is line 362
|
But it works for me on
|
Yes - I got the same validator error messages. But overall I still think it is OK. |
@Sophist-UK I didn’t want to sound negative but I also tried a few weeks before to tackle the same in a different way (wrapping an a tag around a button) as you can see here #4244. Just saying... |
@dgt41 - No offence taken I assure you. And providing the reference to your PR is a useful link. |
@Sophist-UK What I had in my mind, but never found the time to code it, was exactly what you did here but instead of using the |
@zero-24 & @Sophist-UK How do you reproduce the issue? Is the PR to fix the Versions button alignment or just to make it consistent using the tag? |
I get this issue with the Shape Vertex template, but essentially it happens whenever the css for The only way to ensure consistency across all templates is to use the same tag for all buttons. I would not have a problem converting |
@Sophist-UK Thanks for the explanation, all clear to me now. Going to test ;) |
@roland-d As noted above i can't reproduce this #4369 (comment) |
@test All good, tested it on Windows + FireFox and Chrome + IE and Mac + FF and Safari |
@test |
The good news about all the tests on templates where the buttons already align ok is that changing the code doesn't misalign it. They key point is that if we use consistent tags across all the buttons (which this PR does), then the buttons will definitely be aligned in all templates. |
Indeed, there is no change in Protostar and that is the test that it is correct. Having consistent tags is in my opinion the real value in this PR. |
@Sophist-UK please check if #4561 works for you |
@dgt41 Sorry - but I am tied up with other stuff at present and won't be able to do this for you. |
…joomla#4369 Fix for issue joomla#4637 Make button modal
Fix for issue #4637
If you have versioning on, then a front end editing page has the version button misaligned with the Save and Cancel buttons.
This is due to the Save and Cancel buttons being rendered with the
<button>
tag whilst Version is rendered with the<a>
tag - and different CSS is applied.The fix is to change the
<a>
tag for a<button>
tag in/libraries/cms/form/field/contenthistory.php
at lines 49/53.