Skip to content

Commit

Permalink
Merge pull request #226 from Monchi/fix-about-srcdoc
Browse files Browse the repository at this point in the history
ignore about:srcdoc on EventDidStartNavigation
  • Loading branch information
h13i32maru authored Nov 29, 2021
2 parents da17ecd + 3876a02 commit 6dc1e5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Renderer/Fragment/Browser/BrowserLoadFragment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export class BrowserLoadFragment extends React.Component<Props, State> {
// なので、issue選択した時(つまり今ローディング中)はdid-start-navigationを無視する
if (this.state.loading) return;

// iframe srcdoc の読み込み時にもこのイベントが発火され、`about:srcdoc` などが url として渡される
// これは Jasper で開くために有効な URL ではないので無視する
if (!url.startsWith('http')) return;

const isNavigate = await this.navigateIssueFromBrowser(url);
if (isNavigate) return;

Expand Down

0 comments on commit 6dc1e5d

Please sign in to comment.