Merge branch 'main' into mobile-columns-pt-iii
* main: Update Rails Ignore hotkeys with modifiers Fix 1Password account ID (was user UUID) (#2278) Switch 1Password account to 37signals.1password.com (#2276) Remove CSS testing comments Max card count equals geared pagination size Block IPv4-compatible IPv6 addresses in SSRF protection (#2273) Only enable transitions on user interaction Don't update counter if value hasn't changed
This commit is contained in:
@@ -10,7 +10,7 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
handleKeydown(event) {
|
||||
if (this.#shouldIgnore(event)) return
|
||||
if (this.#shouldIgnore(event) || this.#hasModifier(event)) return
|
||||
|
||||
const handler = this.#keyHandlers[event.key.toLowerCase()]
|
||||
if (handler) {
|
||||
@@ -37,6 +37,10 @@ export default class extends Controller {
|
||||
target.closest("input, textarea, [contenteditable], lexxy-editor")
|
||||
}
|
||||
|
||||
#hasModifier(event) {
|
||||
return event.metaKey || event.ctrlKey || event.altKey || event.shiftKey
|
||||
}
|
||||
|
||||
get #selectedCard() {
|
||||
// Find the navigable-list that currently has focus
|
||||
const focusedList = this.navigableListOutlets.find(list => list.hasFocus)
|
||||
|
||||
@@ -5,7 +5,7 @@ export default class extends Controller {
|
||||
static targets = [ "item", "counter" ]
|
||||
static values = {
|
||||
propertyName: String,
|
||||
maxValue: { type: Number, default: 20 }
|
||||
maxValue: { type: Number, default: 15 } // should match first geared pagination page size
|
||||
}
|
||||
|
||||
initialize() {
|
||||
@@ -13,7 +13,9 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
connect() {
|
||||
this.#updateCounter()
|
||||
if (this.itemTargets.length > 0) {
|
||||
this.#updateCounter()
|
||||
}
|
||||
}
|
||||
|
||||
itemTargetConnected() {
|
||||
|
||||
Reference in New Issue
Block a user