Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

For #6354: Tabbing between points in BezierEditor #6576

Merged
merged 5 commits into from
Jan 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,15 @@ define(function (require, exports, module) {

} else if (code === KeyEvent.DOM_VK_ESCAPE) {
return true;
} else if (code === KeyEvent.DOM_VK_TAB && !e.ctrlKey && !e.metaKey && !e.altKey) {
// Switch between the two points by tabbing
if ($(e.target).hasClass("P1")) {
$(".P2").focus();
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make sure (else if ($(e.target).hasClass("P2"))) that this is really P2 here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it is now, if focus is anywhere else, then it will return to P1. If you make that change, and focus goes somewhere else, it will never come back to the P1/P2 elements with Tab key. So, I think this is OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright.
(But normally focus shouldn't go anywhere else)

$(".P1").focus();
}
e.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block should return true; to indicate that key was handled by this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixed this.

return true;
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion src/nls/de/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ define({
// extensions/default/InlineTimingFunctionEditor
"INLINE_TIMING_EDITOR_TIME" : "Zeit",
"INLINE_TIMING_EDITOR_PROGRESSION" : "Verlauf",
"BEZIER_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd><kbd>←</kbd><kbd>→</kbd> Ausgewählten Punkt bewegen<br><kbd class='text'>Umschalt</kbd> Um 10 Einheiten bewegen",
"BEZIER_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd><kbd>←</kbd><kbd>→</kbd> Ausgewählten Punkt bewegen<br><kbd class='text'>Umschalt</kbd> Um 10 Einheiten bewegen<br><kbd class='text'>Tab</kbd> Zwischen Punkten wechseln",
"STEPS_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd> Stufenzahl vergrößern oder verkleinern<br><kbd>←</kbd><kbd>→</kbd> 'Start' oder 'Ende'",

// extensions/default/InlineColorEditor
Expand Down
2 changes: 1 addition & 1 deletion src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ define({
// extensions/default/InlineTimingFunctionEditor
"INLINE_TIMING_EDITOR_TIME" : "Time",
"INLINE_TIMING_EDITOR_PROGRESSION" : "Progression",
"BEZIER_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd><kbd>←</kbd><kbd>→</kbd> Move selected point<br><kbd class='text'>Shift</kbd> Move by ten units",
"BEZIER_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd><kbd>←</kbd><kbd>→</kbd> Move selected point<br><kbd class='text'>Shift</kbd> Move by ten units<br><kbd class='text'>Tab</kbd> Switch points",
"STEPS_EDITOR_INFO" : "<kbd>↑</kbd><kbd>↓</kbd> Increase or decrease steps<br><kbd>←</kbd><kbd>→</kbd> 'Start' or 'End'",

// extensions/default/InlineColorEditor
Expand Down