And once again it concerns two or more editors.
If there are two or more editors on the page, then focus all at once.
3 editor focused together
Only first editor focused
You can use this component for testing
In my opinion, autofocus
option should be No
by default
I'll explain why:
Labels |
Added:
?
|
Category | ⇒ | Plugins |
magic
@dgrammatiko Like that
If you need this component. I'm doing it now, but you can test it.
https://github.com/JoomlaZen/com_jzpages
There are 3 editors in it. 2 of which codemirror if the plugin is enabled
Immediately say if you turn off autofocus then there is no problem
The case where two or more editors on one page is of course rare, but the bug is a bug
Sorry but if you get both editors focused at the same time something is utterly wrong! Focus (and blur) are more than the visual indication eg, focused element is the one that tab key will leave to go to the next one. So even if you somehow hacked the visual part you totally destroyed the keyboard navigation (and probably a few more things)
So even if you somehow hacked the visual part
I did not hacked anything. I just output 3 editors on one tab in my component(I need this). Output using standard code using xml and geInput function
Maybe here?
https://github.com/JoomlaZen/com_jzpages/blob/master/admin/views/page/tmpl/edit.php
or Maybe here?
https://github.com/JoomlaZen/com_jzpages/blob/master/admin/models/forms/page.xml
And if using this plugin does not work correctly, then this is a bug.
Or to output two editors in one tab Joomla breaking something? Personally, I have never read about this.
Moreover, I have never done this without the use of Joomla and there were no problems.
If the system allows you to output 2 editors on one page, then they should work correctly. Or not work at all.
If the system allows you to output 2 editors on one page, then they should work correctly.
Define what is correct, because focusing simultaneously 2 elements in a page breaks the very fundamentals of the web: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
@dgrammatiko Forgive or excuse probably I incorrectly expressed.
At me now the focus is established in 3 editions at once. And this is a bug.
It is necessary that in one.
3 editor focused together
Only first editor focused
Ok now we're in the same page, that's a bug
@dgrammatiko Thank you. Sorry, I got a little excited. Just recently, joomla is very upsetting me in terms of bugs
@okonomiyaki3000 Your expertise please.
Cool. So we should decide if we want to autofocus on the first editor or not at all. I'm slightly leaning toward not at all but I don't have a strong opinion on it.
from an a11y perspective autofocus can be bad
http://www.brucelawson.co.uk/2009/the-accessibility-of-html-5-autofocus/
https://dequeuniversity.com/assets/html/jquery-summit/html5/slides/form-attributes.html
For the component from the example, it's best to be not at all
So I support this position.
However, it turns out that in this case the plugin settings will be ignored.
By the way, maybe add autofocus to the xml attributes? Then the developer can adjust the focus himself and install it on the correct editor, or completely disable autofocus it in form.
This can be done in override. In my turn out to be very flexible
Status | New | ⇒ | Discussion |
Labels |
Added:
J3 Issue
|
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-01 09:50:07 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20228
Well I hardly see how multiple editors can get focus at the same time...