iAdvize
Back

Typing in the question bar no longer sets off your page's keyboard shortcuts

Fixed

If your storefront binds single-letter keyboard shortcuts (s to open search, ? for help, that kind of thing), they could fire while a shopper was typing in the question bar. Worse, a page that cancels the keystroke after handling its shortcut swallowed the character too: the shopper pressed a letter, nothing appeared in the field, and something else happened on the page instead.

Pages normally avoid this by checking whether the shopper is typing in a text field before running a shortcut. That check didn't work here. The question bar is rendered in an isolated container so it can't inherit or disturb your page's styles, and one side effect of that isolation is that your page sees the keystroke as coming from the container, not from a text input, so the "is the shopper typing?" guard let it through.

The tag now keeps key presses inside the question bar instead of passing them on to the rest of the page. Shortcuts you've bound elsewhere on the page still work exactly as before, and pressing Enter in the question bar still sends the message and opens the conversation.

Two keys are deliberately still passed through, because they mean something to your page rather than to our field: Escape and Tab. The question bar is only on screen while the conversation is closed, so if a shopper has one of your own dialogs open behind it, Escape still dismisses it and Tab still moves through your page's focus order.

One limit worth knowing if you write your own shortcut code: a page that hooks keystrokes at the earliest possible stage (a capture-phase listener on document or window) still sees them. If you do that, guard your shortcut against our container yourself.

Nothing to change on your side: an already-installed tag picks this up within a few minutes of the release, with no action from you. This only ever affected the question bar. The conversation itself runs in an iframe on iAdvize's domain, so what a shopper types there never reached your page in the first place.

Resources

A placement diagram of the question bar, a schematic storefront page with a single-line field docked centre-bottom and a send button at its right.