Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the "town hall" (meta-discussion site) for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on The keyboard shortcut navigation is flipped

Post

The keyboard shortcut navigation is flipped

+4
−0

The keyboard shortcut j should navigate to the next post (down). Instead it navigates to the previous post (up).

The keyboard shortcut k should navigate to the previous post (up). Instead it navigates to the next post (down).

This is the opposite to the help menu (?):

j   Move one item down
k   Move one item up

As well the opposite to how Vim uses these two (the shortcuts are based on it).

This bug applies both in question lists as well as Q&As.

History

1 comment thread

Oops! We're on it. (I am puzzled by how this happened.) (4 comments)
Oops! We're on it. (I am puzzled by how this happened.)
Monica Cellio‭ wrote 9 months ago

Oops! We're on it. (I am puzzled by how this happened.)

VLAZ‭ wrote 9 months ago

No idea, but the deployed code seems different than the pre-build version. In the GitHub repo, the code in keyboard_tools.js is correct - defines that j will go to the next item (via .nextAll()) and k would go to the previous (via .prevAll()).

The deployed code is the opposite. I don't know why the discrepancy exists, but seems there was another source which produced the deployed code.

VLAZ‭ wrote 9 months ago · edited 9 months ago

The deployed code (slightly un-minified):

else if ('k' === t.key) null == _CodidactKeyboard.selectedItem ? _CodidactKeyboard.selectedItem = $('[data-ckb-list-item]:first-of-type') [0] : _CodidactKeyboard.selectedItem = $(_CodidactKeyboard.selectedItem).nextAll('[data-ckb-list-item]') [0] ||
          _CodidactKeyboard.selectedItem,
          _CodidactKeyboard.updateSelected();
else if ('j' === t.key) null == _CodidactKeyboard.selectedItem ? _CodidactKeyboard.selectedItem = $('[data-ckb-list-item]:first-of-type') [0] : _CodidactKeyboard.selectedItem = $(_CodidactKeyboard.selectedItem).prevAll('[data-ckb-list-item]') [0] ||
          _CodidactKeyboard.selectedItem,
          _CodidactKeyboard.updateSelected();
Monica Cellio‭ wrote 9 months ago

We just fixed the bug (see the timestamp on the commit you linked to) but haven't deployed yet. Fix coming soon!