change(web): add unique classname to mobile-device page-trailer element

Addresses, but does not fix, #13588.

This change provides a simple classname to the page-trailer element Keyman Engine for Web adds to pages when in mobile mode.  This "page trailer" was originally added so that the on-screen keyboard does not hide important elements near the bottom of the page when visible.  That said, we have gotten site-designer complaints about it; exposing a way for site-designers to retrieve it in queries and/or customize its properties will provide a reasonable workaround for such cases.
This commit is contained in:
Joshua Horton 2025-04-01 11:44:45 +07:00
parent 4f5b51e921
commit cd322340df

View file

@ -57,6 +57,7 @@ export class PageIntegrationHandlers {
// Add a blank DIV to the bottom of the page to allow the bottom of the page to be shown
const dTrailer = this.mobilePageTrailer = document.createElement('div');
const ds=dTrailer.style;
dTrailer.className = 'keyman-page-trailer';
ds.width='100%';
ds.height=(screen.width/2)+'px'; // ... interesting choice, but okay.
document.body.appendChild(dTrailer);