11export { getResponsive } from '../../modules/responsive.js'
22import { copy , drag , getDescribedElement , getOuterHeight , getWidth , isVisible } from '../../modules/utility.js'
3- import '../../modules/browser.js '
3+ import browser from '../../modules/browser.min.mjs '
44import Data from '../../modules/data.js'
55import EventHandler from '../../modules/event-handler.js'
66import Popover from "../../modules/base-popover.js"
@@ -54,7 +54,7 @@ export function saveColumnOrder(options) {
5454 localStorage . setItem ( key , JSON . stringify ( options . columns ) ) ;
5555}
5656
57- export function reset ( id ) {
57+ export async function reset ( id ) {
5858 const table = Data . get ( id )
5959 if ( table === null ) {
6060 return ;
@@ -79,7 +79,7 @@ export function reset(id) {
7979 table . tables . push ( table . thead . firstChild )
8080 table . tables . push ( table . body . firstChild )
8181 table . scrollWidth = parseFloat ( table . body . style . getPropertyValue ( '--bb-scroll-width' ) ) ;
82- fixHeader ( table )
82+ await fixHeader ( table ) ;
8383
8484 EventHandler . on ( table . body , 'scroll' , ( ) => {
8585 const left = table . body . scrollLeft
@@ -388,7 +388,7 @@ const setBodyHeight = table => {
388388 }
389389}
390390
391- const fixHeader = table => {
391+ const fixHeader = async table => {
392392 const el = table . el
393393 const fs = el . querySelector ( '.fixed-scroll' )
394394
@@ -398,8 +398,8 @@ const fixHeader = table => {
398398 if ( prev . classList . contains ( 'fixed-right' ) && ! prev . classList . contains ( 'modified' ) ) {
399399 let margin = prev . style . right
400400 margin = margin . replace ( 'px' , '' )
401- const b = window . browser ( )
402- if ( b . device !== 'PC ' ) {
401+ const b = await browser . getInfo ( ) ;
402+ if ( b . device !== 'Desktop ' ) {
403403 margin = ( parseFloat ( margin ) - table . scrollWidth ) + 'px'
404404 }
405405 prev . classList . add ( 'modified' )
0 commit comments