@@ -274,7 +274,7 @@ class ClassHelper extends HTMLElement {
274274
275275 let tracker = window . location . pathname . split ( '/' ) [ 1 ] ;
276276 let url = new URL ( window . location . origin + "/" + tracker ) ;
277- url . searchParams . append ( "@template" , "json " ) ;
277+ url . searchParams . append ( "@template" , "translation " ) ;
278278 url . searchParams . append ( "properties" , Object . keys ( translations ) . join ( ',' ) ) ;
279279
280280 let resp , json ;
@@ -974,9 +974,13 @@ class ClassHelper extends HTMLElement {
974974 this . popupRef . document . querySelector ( "tr.row-style" ) . parentElement . lastChild . focus ( ) ;
975975 }
976976 } else if ( e . key === ">" ) {
977- this . popupRef . document . getElementById ( "popup-pagination" ) . lastChild . focus ( ) ;
977+ if ( e . target . tagName === "TR" || e . target . tagName != "INPUT" && e . target . tagName != "SELECT" ) {
978+ this . popupRef . document . getElementById ( "popup-pagination" ) . lastChild . focus ( ) ;
979+ }
978980 } else if ( e . key === "<" ) {
979- this . popupRef . document . getElementById ( "popup-pagination" ) . firstChild . focus ( ) ;
981+ if ( e . target . tagName === "TR" || e . target . tagName != "INPUT" && e . target . tagName != "SELECT" ) {
982+ this . popupRef . document . getElementById ( "popup-pagination" ) . firstChild . focus ( ) ;
983+ }
980984 } else if ( e . key === "Enter" ) {
981985 if ( e . target . tagName == "TR" && e . shiftKey == false ) {
982986 e . preventDefault ( ) ;
@@ -1207,7 +1211,17 @@ function enableClassHelper() {
12071211 /**@todo - make api call? get 404 then early return? */
12081212 // http://localhost/demo/rest
12091213
1210- customElements . define ( CLASSHELPER_TAG_NAME , ClassHelper ) ;
1214+ fetch ( "rest" )
1215+ . then ( resp => resp . json ( ) )
1216+ . then ( json => {
1217+ if ( json . error ) {
1218+ console . log ( json . error ) ;
1219+ return ;
1220+ }
1221+ customElements . define ( CLASSHELPER_TAG_NAME , ClassHelper ) ;
1222+ } ) . catch ( err => {
1223+ console . error ( err ) ;
1224+ } ) ;
12111225}
12121226
12131227enableClassHelper ( ) ;
0 commit comments