J3 Issue ?
avatar Septdir
Septdir
24 Apr 2018

Bug

And once again it concerns two or more editors.

If there are two or more editors on the page, then focus all at once.

Actual result

3 editor focused together

Expected result

Only first editor focused

You can use this component for testing

Sentence.

In my opinion, autofocus option should be No by default

I'll explain why:

  1. It is not particularly correct that when I open the itemform immediately focus on the content
  2. If for some reason the editor does not fall into the field of view, then the page will be scrolled down to it.
avatar Septdir Septdir - open - 24 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2018
Labels Added: ?
avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Apr 2018
Category Plugins
avatar Septdir Septdir - change - 24 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 24 Apr 2018
avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2018

If there are two or more editors on the page, then focus all at once

Well I hardly see how multiple editors can get focus at the same time...

avatar brianteeman
brianteeman - comment - 24 Apr 2018

magic

avatar Septdir
Septdir - comment - 24 Apr 2018

@dgrammatiko Like that
default

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

avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2018

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)

avatar Septdir
Septdir - comment - 24 Apr 2018

@dgrammatiko

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.

avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2018

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

avatar Septdir
Septdir - comment - 24 Apr 2018

@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.

Actual result

3 editor focused together

Expected result

Only first editor focused

avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2018

Ok now we're in the same page, that's a bug

avatar Septdir
Septdir - comment - 24 Apr 2018

@dgrammatiko Thank you. Sorry, I got a little excited. Just recently, joomla is very upsetting me in terms of bugs

avatar Septdir Septdir - change - 24 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 24 Apr 2018
avatar Quy
Quy - comment - 24 Apr 2018

@okonomiyaki3000 Your expertise please.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

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.

avatar Septdir
Septdir - comment - 25 Apr 2018

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

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Apr 2018
Status New Discussion
avatar grig0ry
grig0ry - comment - 29 Apr 2018

I agree with @Septdir. Adding autofocus to the xml attributes will be an excellent solution.

avatar brianteeman brianteeman - change - 29 Apr 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 29 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 1 May 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-05-01 09:50:07
Closed_By joomla-cms-bot
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 May 2018
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 1 May 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 May 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 May 2018

closed as having Pull Request #20270.

Add a Comment

Login with GitHub to post a comment