Feature RTC NPM Resource Changed PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
26 Jan 2024

Summary of Changes

Both the keypress event and keyCode property are deprecated in Javascript. This PR replaces them accordingly.

Testing Instructions

Calendar:

Open a calendar and ensure:

  1. Shift + Space appends the date to the input.
  2. ESC closes the calendar.
  3. Tab closes the calendar.
  4. The arrow keys (, , , ) navigate through the calendar accordingly.
  5. Repeat step 4 in RTL mode.

Web Install:

  1. Go to administrator/index.php?option=com_installer&view=install, then navigate to the "Install from Web" tab.
  2. Enter a phrase in the "Search" field.
  3. Press Enter.
  4. The search should be initiated.

@dgrammatiko I removed the following conditional statement:

if (ev.target === this.inputField && !(K>48 || K<57 || K===186 || K===189 || K===190 || K===32)) {
  return stopCalEvent(ev);
}

because I could not meet the condition, and using K > 48 || K < 57 makes no sense. It's possible that this was a mistake but the code doesn't contain any comments, sol....

avatar C-Lodder C-Lodder - open - 26 Jan 2024
avatar C-Lodder C-Lodder - change - 26 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jan 2024
Category JavaScript Repository NPM Change
avatar C-Lodder C-Lodder - change - 26 Jan 2024
Labels Added: NPM Resource Changed PR-5.1-dev
avatar Fedik
Fedik - comment - 26 Jan 2024

Please use event.code instead of event.key, because the key is altered by keyboard locale and layout. And code always represents a physical key on the keyboard.

avatar dgrammatiko
dgrammatiko - comment - 26 Jan 2024

It's possible that this was a mistake but the code doesn't contain any comments

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…

avatar C-Lodder
C-Lodder - comment - 26 Jan 2024

@Fedik Oops, done

avatar Quy
Quy - comment - 26 Jan 2024

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.

avatar C-Lodder C-Lodder - change - 28 Jan 2024
Labels Added: Feature
avatar C-Lodder
C-Lodder - comment - 28 Jan 2024

@Quy Fixed RTL. Thanks for testing

avatar Fedik
Fedik - comment - 28 Jan 2024

@Quy are you sure?
To me, it sounds very strange, but I cannot really check, or find any info about it.
The codes represents a physical keys on keyboard, With physical direction Up/Down/Lft/Rgt which should not changes, no matter what.

avatar Quy Quy - test_item - 29 Jan 2024 - Tested successfully
avatar Quy
Quy - comment - 29 Jan 2024

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.

avatar Quy
Quy - comment - 29 Jan 2024

@Fedik I was pointing out that this PR did the opposite for left/right keys which has been fixed since.

avatar viocassel viocassel - test_item - 29 Jan 2024 - Tested successfully
avatar viocassel
viocassel - comment - 29 Jan 2024

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.

avatar Quy Quy - change - 29 Jan 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 29 Jan 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42715.

avatar Quy Quy - change - 31 Jan 2024
Labels Added: RTC
avatar LadySolveig LadySolveig - change - 2 Feb 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-02-02 22:50:24
Closed_By LadySolveig
avatar LadySolveig LadySolveig - close - 2 Feb 2024
avatar LadySolveig LadySolveig - merge - 2 Feb 2024
avatar LadySolveig
LadySolveig - comment - 2 Feb 2024

Thank you @C-Lodder and also for testing, support and review @dgrammatiko @Fedik @Quy @viocassel

Add a Comment

Login with GitHub to post a comment