File tree 2 files changed +3
-10
lines changed
2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -254,15 +254,7 @@ class OmniBox extends HTMLElement {
254
254
this . input . value = newValue
255
255
256
256
const { pathname, hostname } = new URL ( newValue )
257
- let slashCount = pathname . split ( '/' ) . length
258
- if ( ! hostname ) {
259
- slashCount -= 1
260
- }
261
- if ( pathname . endsWith ( '/' ) ) {
262
- slashCount -= 1
263
- }
264
-
265
- const hasUpperFolders = slashCount > 2
257
+ const hasUpperFolders = pathname !== '/'
266
258
this . upButton . classList . toggle ( 'hidden' , ! hasUpperFolders )
267
259
268
260
const noFocus = ( new URL ( window . location . href ) . searchParams ) . get ( 'noFocus' ) === 'true'
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ search.addEventListener('forward', () => {
36
36
} )
37
37
38
38
search . addEventListener ( 'up' , ( ) => {
39
- currentWindow . loadURL ( new URL ( '../' , search . src ) . href )
39
+ const next = search . src . endsWith ( '/' ) ? '../' : './'
40
+ currentWindow . loadURL ( new URL ( next , search . src ) . href )
40
41
} )
41
42
42
43
search . addEventListener ( 'navigate' , ( { detail } ) => {
You can’t perform that action at this time.
0 commit comments