Product Description
/**
* Common event handler for click and keydown events.
* @param {Event} event - The event object.
* @param {Function} handleClickOrEnter - Function to handle click or Enter key events.
* @param {Function} handleEsc - Function to handle Esc key events.
*/
// [TODO][AplusMantle-8064] Create common event handler util(key events, click events) in AplusModuleResources
function handleClickAndKeyEvents(event, handleClickOrEnterOrSpace) {
const ENTER_KEY_CODE = 13;
const ESCAPE_KEY_CODE = 27;
const SPACE_KEY_CODE = 32;
const isClick = event.type === 'click';
const isKeydown = event.type === 'keydown';
const isEnter = isKeydown && event.keyCode === ENTER_KEY_CODE;
const isSpace = isKeydown && event.keyCode === SPACE_KEY_CODE;
const isEsc = isKeydown && event.keyCode === ESCAPE_KEY_CODE;
if (isClick || isEnter || isSpace) {
handleClickOrEnterOrSpace();
} else if (isEsc) {
handleEsc(event);
}
}
/**
* Function to handle esc key event.
* @param {Event} event - The event object.
*/
function handleEsc(event) {
event.target.blur()// force remove focus
}



Bed Side
Durable & Stylish Nightstand
Choosing a set of sophisticated looking nightstands that would make your bedroom look nice and complete. Two nightstands help achieve symmetry in the design and increases storage space.
Couch Side
Simple & Classic End Table
Side tables can seamlessly add a pop of color, a touch of elegance, or additional storage to your living room or bedroom. The simple design easily fits with any decor in a living room or bedroom.
Chair Side
Functional & Convenient Side Table
Let's be honest: The side table is the unsung hero of the furniture world. Serving not only as catchalls for remotes, cups, magazines, they are also decorative power players in any room, adding just the right color or texture to a small space.
{"clickstreamNexusMetricsConfig":{"actionType":"DISCOVERY","productId":"","eventOwner":"vsemetrics_playercards","schemaId":"clickstream.CustomerEvent.4","producerId":"vsemetrics_playercards","eventType":"IVEVideoView"},"clientPrefix":"aplus-25425","closedCaptionsConfig":{"captionsOnTexts":{"en":"English (Automated)"},"captionsOffText":"Captions off","languageToLabelTexts":{"English":"English"}},"sushiMetricsConfig":{"isRobot":false,"clientId":"VSE-US","videoAsinList":"","weblabIds":"","eventSource":"Player","sessionId":"000-7829177-0544714","refMarkers":"aplus-25425_ref","placementContext":"AplusWidget","marketplaceId":"ATVPDKIKX0DER","isInternal":false,"endpoint":"https://unagi-na.amazon.com/1/events/com.amazon.eel.vse.metrics.prod.events.test","requestId":"83E63378F7FD45738A93","customerId":"0","sessionType":1},"mimeType":"video/mp4","nexusMetricsConfig":{"isInternal":false,"widgetMetricsSchemaId":"vse.VSECardsEvents.8","clientId":"VSE-US","videoAsinList":"","weblabIds":"","eventSource":"Player","videoAsin":"hero-video","producerId":"vsemetrics_playercards","refMarkers":"aplus-25425_ref","placementContext":"AplusWidget","playerTSMMetricsSchemaId":"vse.VSECardsPlayerEvents.7"},"videoHeight":0,"videoWidth":0,"videoUrl":"https://m.media-amazon.com/images/S/aplus-media/sc/f5ad6b5c-6d6f-49e4-8860-4846ecfb499b.mp4","metricsEmissionMethod":"nexus","imageUrl":"https://m.media-amazon.com/images/S/aplus-media/sc/ea661cd8-b204-41f0-b800-2985f1f6cbc6.__CR0,0,1464,600_PT0_SX1464_V1___.jpg","awaConfig":{"useUpNextComponent":false,"clickstreamNexusMetricsConfig":{"actionType":"DISCOVERY","productId":"","eventOwner":"vsemetrics_playercards","schemaId":"clickstream.CustomerEvent.4","producerId":"vsemetrics_playercards","eventType":"IVEVideoView"},"initialVideo":"hero-video","shouldPreload":true,"enableClickBasedAttribution":false,"isChromelessPlayer":false,"closedCaptionsConfig":{"captionsOnTexts":{"en":"English (Automated)"},"captionsOffText":"Captions off","languageToLabelTexts":{"English":"English"}},"showPlayerPlayButton":false,"isVideoImmersivePlayer":false,"metricsEmissionMethod":"nexus","skipInitialFocus":false,"playerSkin":"none","disabledViewIds":["replayHint"],"includeEarnsComissionDisclosure":false,"customerId":"0","containerId":"aplus-25425-player-0b0d7818-e3b3-49cc-a86c-7f79aa0aba44","allowCrossOrigin":false,"requestMetadata":{"marketplaceId":"ATVPDKIKX0DER","clientId":"VSE-US","method":"AplusWidget","requestId":"83E63378F7FD45738A93","pageAsin":"","sessionId":"000-7829177-0544714"},"shouldLoop":false,"shouldDisableControls":false,"alwaysSetInitialVideo":true,"showPlayerCloseButton":false,"clientPrefix":"","useAutoplayFallback":false,"sushiMetricsConfig":{"isRobot":false,"clientId":"VSE-US","videoAsinList":"","weblabIds":"","eventSource":"Player","sessionId":"000-7829177-0544714","refMarkers":"aplus-25425_ref","placementContext":"AplusWidget","marketplaceId":"ATVPDKIKX0DER","isInternal":false,"endpoint":"https://unagi-na.amazon.com/1/events/com.amazon.eel.vse.metrics.prod.events.test","requestId":"83E63378F7FD45738A93","customerId":"0","sessionType":1},"ospLinkCode":"","showPosterImage":true,"languageCode":"en","version":"","nexusMetricsConfig":{"isInternal":false,"widgetMetricsSchemaId":"vse.VSECardsEvents.8","clientId":"VSE-US","videoAsinList":"","weblabIds":"","eventSource":"Player","videoAsin":"hero-video","producerId":"vsemetrics_playercards","refMarkers":"aplus-25425_ref","placementContext":"AplusWidget","playerTSMMetricsSchemaId":"vse.VSECardsPlayerEvents.7"},"shouldStartMuted":false,"airyVersion":"VideoJS","languagePreferenceStrings":{},"enableInactiveFocus":true,"isReactFactory":false,"enableDelphiAttribution":false,"includeReportWidget":false,"shouldAutoplay":false},"needPlayerFactory":false,"isMobile":false}