Mojolicious-Plugin-Materialize
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Materialize/js/materialize.js view on Meta::CPAN
// Update the picker states.
STATE.methods = {}
STATE.start = true
STATE.open = false
STATE.type = ELEMENT.type
// Confirm focus state, convert into text input to remove UA stylings,
// and set as readonly to prevent keyboard popup.
ELEMENT.autofocus = ELEMENT == getActiveElement()
ELEMENT.readOnly = !SETTINGS.editable
ELEMENT.id = ELEMENT.id || STATE.id
if ( ELEMENT.type != 'text' ) {
ELEMENT.type = 'text'
}
// Create a new picker component with the settings.
P.component = new COMPONENT(P, SETTINGS)
lib/Mojolicious/Plugin/Materialize/js/materialize.js view on Meta::CPAN
P.$root.eq(0).focus()
}).
// Handle keyboard event based on the picker being opened or not.
on( 'keydown.' + STATE.id, handleKeydownEvent )
}
// Update the aria attributes.
aria(ELEMENT, {
haspopup: true,
expanded: false,
readonly: false,
owns: ELEMENT.id + '_root'
})
}
/**
* Prepare the root picker element with all bindings.
*/
( run in 0.839 second using v1.01-cache-2.11-cpan-364913b4093 )