Comments (17)
Sounds like a popup protection or so
More like Safari being a special snowflake as always 😒
from mudblazor.
Sorry guys for being late to answer I was very busy.
@igotinfected I tried with MudBlazor Docs.Server
as well it is not working only on safari.
from mudblazor.
Sorry guys for being late to answer I was very busy. @igotinfected I tried with
MudBlazor Docs.Server
as well it is not working only on safari.
No worries! Been looking for solutions ;) Thought we would need to revert the recent changes to MudFileUpload
because of Safari behaviour but I may have found a more robust way that works on every browser while keeping the reworked MudFileUpload
. Will be opening a PR tonight or tomorrow if everything goes well.
The short version of the issue is that Safari doesn't like when some events are triggered programmatically without direct user interaction. Since we are using JS interop to trigger the file picker, Safari won't acknowledge the action when it is executed via Blazor Server, I'm assuming because there is a back and forth between client & server which might not pass whichever checks Safari runs.
from mudblazor.
it doesn't work in my project but the docs site does work
Sounds like cache issue. If the functionality wasn't working, it wouldn't work in docs or trymudblazor.
from mudblazor.
All problems were solved via discord.
from mudblazor.
great, but it would be cool to have the solution here for the googlers
- The opening issue in Safari was fixed via clearing cache, obj, and bin folders.
- The problem in edge/chrome with reopening(firing twice) was solved by removing
HtmlTag="label"
from the button in theActivatorContent
since it wasn't clear to the person from the guide from where it should be removed.
from mudblazor.
from mudblazor.
from mudblazor.
@sardar97 can you describe what exactly isn't working + your version of MacOS and Safari? Seems to be working for me:
![image](https://private-user-images.githubusercontent.com/15004223/337976895-dbd35dfd-87e1-4aa8-aaa6-0eea5204eed7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1NzE5MjAsIm5iZiI6MTcyMTU3MTYyMCwicGF0aCI6Ii8xNTAwNDIyMy8zMzc5NzY4OTUtZGJkMzVkZmQtODdlMS00YWE4LWFhYTYtMGVlYTUyMDRlZWQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYL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SGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-EZBblNOjwW0nPBdU3waxsEt1vSVLjLP7CrP-frI1Bw)
from mudblazor.
@igotinfected actually it works for me as well with mudblazor doc but with my project not working I don't know why!
However I works on other browser with my project.
by the way my project render is Server Global
here a video I showed the codes which I used same as mudblazor doc and a picture to show my safari and Mac version.
from mudblazor.
Can you show your code?
from mudblazor.
@ScarletKuro it's in the video, but I can reproduce it just by running the current docs with the Docs.Server
project and testing the first MudFileUpload
examples. I'm not quite sure what is causing it though. It works on all other browsers, and adding logs to the mudWindow.click
function shows that it is executed as expected... The drag and drop examples work with clicks btw.
Edit: missing words
from mudblazor.
The short version of the issue is that Safari doesn't like when some events are triggered programmatically without direct user interaction.
Sounds like a popup protection or so
from mudblazor.
Are we sure this is fixed? I am running 7.2.0/7.3.0 and still having the same problem that @sardar97 is reporting where it doesn't work in my project but the docs site does work. Was working in v6 but when I have now upgraded to v7 it doesn't work in Safari.
Also when using Edge the the Open and Cancel buttons will redisplay the dialog on the first use.
from mudblazor.
@Welchen other than the cache, make sure you remove the HtmlTag
and for
properties/attributes. These are no longer necessary and could be causing your issue:
v6
<MudFileUpload T="IBrowserFile" FilesChanged="UploadFiles">
<ButtonTemplate>
<MudButton HtmlTag="label"
Variant="Variant.Filled"
Color="Color.Primary"
StartIcon="@Icons.Material.Filled.CloudUpload"
for="@context.Id">
Upload Files
</MudButton>
</ButtonTemplate>
</MudFileUpload>
v7
<MudFileUpload T="IBrowserFile" FilesChanged="UploadFiles">
<ActivatorContent>
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
StartIcon="@Icons.Material.Filled.CloudUpload">
Upload Files
</MudButton>
</ActivatorContent>
</MudFileUpload>
from mudblazor.
great, but it would be cool to have the solution here for the googlers
from mudblazor.
- The problem in edge/chrome with reopening(firing twice) was solved by removing
HtmlTag="label"
from the button in theActivatorContent
since it wasn't clear to the person from the guide from where it should be removed.
To elaborate, the documentation for MudFileUpload states to remove the HtmlTag if you have it. I looked at the MudFileUpload and didn't see one, so didn't think there was anything to be removed. That statement in the docs is in reference to the button or activator in the ActivatorContent. Didn't think to look down in there. Now that I know what I was supposed to be looking for, I understand it.
from mudblazor.
Related Issues (20)
- Masked input slightly changes font-size
- Menu OnTouch is not available and also touch is not working on android device HOT 9
- MudTreeView is piece of shit in ^7.0.0 HOT 1
- MudTextField didn't clear when I use OnKeyDown/OnKeyUp HOT 4
- MudTreeview: Multi-Selection bug on Expand/Collapse HOT 1
- MudAutocomplete "Required" valiadtion failes when DebounceInterval is high enough and SearchFunc is slow. HOT 8
- MudTimeSeriesChart TimeLabelSpacing is incorrect
- MudAutocomplete Validation does not work with pre-filled value when required
- Please revert removal of Title parameter for buttons HOT 7
- v7 Documentation for Custom Themes still references "Palette" for "PaletteLight" HOT 1
- The default theme changes due to the print display process HOT 4
- MudDataGridPager Displaying {0}-{1} of {2} without the placeholder data HOT 9
- Roadmaps page does not display links correctly
- HierarchyColumn Tag Parameter Is Ignored HOT 1
- Consider providing splitted css files to help with performance-sensitive pages
- MudDateRangePicker value is not being set when a disabled date is captured in the range HOT 4
- MudFileUpload (MudBlazor v.7.3.0). The file selection dialog does not open in Debian 10. HOT 2
- MudTreeView does not display expand button with Server-Side Data after ReloadAsync for collapsed nodes HOT 1
- Close button dialog - changing focus via tab never reaches the X close button
- missing translation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mudblazor.