PDF.js Viewer search function on mobile

Which product are you using?
PDF.js Express Viewer

PDF.js Express Viewer

Detailed description of issue

  1. Search function not readily visible on mobile view. User needs to click on options to see it.

  2. The search window opens as an overlay on top of the document viewer in the mobile view. Clicking on one of the search results does not close the search window to render the document.

Expected behaviour

  1. Can the position of the search option be changed on the toolbar so that it is readily visible on mobile view?
  2. When user clicks on a search result, the search window should close/collapse and the result should be displayed on the document.

Does your issue happen with every document, or just one?
All

Link to document
NA

Code snippet
NA

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hey there,

  1. You can use this code to force the search button to be visible on mobile
instance.UI.setHeaderItems((header) => {
    header.getHeader('default').push({
      img: "icon-header-search",
      index: -1,
      title: "component.searchPanel",
      type: "toggleElementButton",
      element: 'searchPanel',
    });
  });
  1. This should happen by default but there seems to be a regression- we’ll have this fixed in the next release.

Thanks!
Logan