File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ export const UrlInput: Component<
9090 this . value = item ;
9191 this . active = false ;
9292 this . input . blur ( ) ;
93+
94+ this . navigate ( this . value ) ;
9395 } }
9496 class :focused = { use ( this . focusindex ) . map (
9597 ( i ) => i - 1 === this . overflowItems . indexOf ( item )
@@ -232,12 +234,15 @@ IconButton.css = `
232234export const Omnibox : Component < {
233235 value : string ;
234236 navigate : ( url : string ) => void ;
237+ goBack : ( ) => void ;
238+ goForwards : ( ) => void ;
239+ refresh : ( ) => void ;
235240} > = function ( cx ) {
236241 return (
237242 < div >
238- < IconButton icon = { iconBack } > </ IconButton >
239- < IconButton icon = { iconForwards } > </ IconButton >
240- < IconButton icon = { iconRefresh } > </ IconButton >
243+ < IconButton click = { this . goBack } icon = { iconBack } > </ IconButton >
244+ < IconButton click = { this . goForwards } icon = { iconForwards } > </ IconButton >
245+ < IconButton click = { this . refresh } icon = { iconRefresh } > </ IconButton >
241246 < Spacer > </ Spacer >
242247 < UrlInput value = { use ( this . value ) } navigate = { this . navigate } > </ UrlInput >
243248 < Spacer > </ Spacer >
Original file line number Diff line number Diff line change @@ -247,6 +247,15 @@ export class Browser extends StatefulClass {
247247 />
248248 < Omnibox
249249 value = { use ( this . activetab . url ) }
250+ goBack = { ( ) => {
251+ this . activetab . frame . back ( ) ;
252+ } }
253+ goForwards = { ( ) => {
254+ this . activetab . frame . forward ( ) ;
255+ } }
256+ refresh = { ( ) => {
257+ this . activetab . frame . reload ( ) ;
258+ } }
250259 navigate = { ( url ) => this . navigate ( url ) }
251260 />
252261 { shell }
You can’t perform that action at this time.
0 commit comments