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
[5.1] Replace deprecated KeyboardEvent code #42715
Conversation
|
Please use event.code instead of event.key, because the |
the conditional is basically a way to ignore keys other than the ones actually used by the calendar but not sure if there’s a need for it. This is code from the early 2000’s so who knows anymore… |
|
@Fedik Oops, done |
|
In RTL, the left key moves to the right and right key moves to the left. Not sure if this is the correct behavior as this is not the case without this PR. |
|
@Quy Fixed RTL. Thanks for testing |
|
@Quy are you sure? |
|
I have tested this item ✅ successfully on 0625506 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42715. |
|
@Fedik I was pointing out that this PR did the opposite for left/right keys which has been fixed since. |
|
I have tested this item ✅ successfully on 0625506 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42715. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42715. |
|
Thank you @C-Lodder and also for testing, support and review @dgrammatiko @Fedik @Quy @viocassel |
Summary of Changes
Both the
keypressevent andkeyCodeproperty are deprecated in Javascript. This PR replaces them accordingly.Testing Instructions
Calendar:
Open a calendar and ensure:
Web Install:
administrator/index.php?option=com_installer&view=install, then navigate to the "Install from Web" tab.@dgrammatiko I removed the following conditional statement:
because I could not meet the condition, and using
K > 48 || K < 57makes no sense. It's possible that this was a mistake but the code doesn't contain any comments, sol....