Sha256: 870802e1dc391cde667262d05f23b7b3d71f1c4014e5c4ffaeb5173956a60860
Contents?: true
Size: 945 Bytes
Versions: 3
Compression:
Stored size: 945 Bytes
Contents
# Editing a single best_in_place element, pressing tab should focus and edit the next best_in_place element. # ready = -> $(document).on('keydown', '.best_in_place * input, .best_in_place * textarea', (event)-> if event.keyCode == 9 # tab if not $(this).closest(".edit_mode_group").hasClass("currently_in_edit_mode") this_element = $(this).closest(".best_in_place") if not event.shiftKey next_element = $($(".best_in_place")[$(".best_in_place").index( this_element ) + 1]) next_element.click().focus() else prev_element = $($(".best_in_place")[$(".best_in_place").index( this_element ) - 1]) prev_element.click().focus() event.preventDefault() ) $(document).on('focus', 'input', (event) -> $(event.target).select() ) $(document).on('focus', 'textarea', (event) -> $(event.target).select() ) $(document).ready(ready)
Version data entries
3 entries across 3 versions & 1 rubygems