blazorBootstrap was undefined

Aperta
#1,183 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
bootstrap, html
Ambito
frontend

Direzione di ricerca

Start by checking how the Blazor WebAssembly app loads _content/Blazor.Bootstrap/blazor.bootstrap.js and initializes window.blazorBootstrap.modal.initialize, then reproduce the page navigation and hard refresh in Safari. The report gives no repository, reproducible steps, or expected behavior, so first establish a reliable reproduction and identify the affected initialization path before defining a fix.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
When loading a new page in Safari with the library in the solution I get the following error in the browser console:
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not find 'window.blazorBootstrap.modal.initialize' ('blazorBootstrap' was undefined). @https://ourDomain.com/_framework/blazor.webassembly.js:1:377
It only happens when I open a new page and sometimes when I hard refresh but not always and ONLY in Safari.

To Reproduce
Not possible

Expected behavior
Not possible

Screenshots

Versions (please complete the following information):

  • .NET Version: .NET 8
  • BlazorBootstrap: 3.4.0
  • Blazor WebAssembly / Server: WebAssembly
  • Blazor Interactive Render Mode: None
  • Blazor Interactivity Location: Not really sure how I know that...

Sample code
in csproj:
<PackageReference Include="Blazor.Bootstrap" Version="3.4.0" />
In _Imports.razor:
@using BlazorBootstrap
In index.html I have not used the bootstrap-icons (Im using font-awsome):
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> <script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>

GitHub repo
Not possible

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Safari
  • Version: 26.1 (Safari)

Smartphone (please complete the following information):
Not tested

Additional context
Add any other context about the problem here.

Lingua principale
HTML
Stelle
1.2k
Fork
111
Merge medio
4m
PR unite (30g)
55

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vikramlearning/blazorbootstrap

Tutte le issue di vikramlearning/blazorbootstrap

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.