QR scan area overflowing in Safari on iOS
See original GitHub issueI’ve implemented the QR code reader in my Vue app and it looks as expected when I check it with Chrome Developer Tools mobile view (iPhone 6/7/8).
However, this is not replicated when I open the web app on my iPhone using Safari. The camera view overflows the rectangular box with white border:
The code for my scan page is:
<template>
<div class="scan-content">
<div class="scan-ready">
<div class="title">Scan the QR code</div>
<qrcode-reader @decode="onDecode" :paused="qrPaused"></qrcode-reader>
<md-button class="md-raised" @click="cancelScan">Cancel</md-button>
</div>
</div>
</template>
<script>
export default {
name: 'QrScan',
data: () => ({
progressBar: false,
decodedString: 'nothing received yet',
qrPaused: false
}),
methods: {
onDecode (decodedString) {
this.decodedString = decodedString
this.qrPaused = true
alert(decodedString)
},
cancelScan () {
this.$router.replace('/app')
}
}
}
</script>
<style scoped>
.scan-content {
height: 100%;
background-color: lightgrey;
}
.scan-loader svg {
width: 50px;
height: 50px;
}
.scan-ready {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 100%;
}
.scan-ready {
text-align: center;
font-size: 20px;
}
.scan-ready .title {
padding: 20px 50px;
text-align: center;
font-size: 18px;
background-color: white;
}
.qrcode-reader {
max-width: 400px;
margin: 20px 15px;
border: 5px solid white;
}
</style>
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Deep link QR code opening Safari instead of App in iOS 14
I have implemented deep link / universal links in my app, When i scan QR code in iOS 13 it will opens app...
Read more >QR code reader hidden in iOS 11 Safari app - Apple Community
In iOS 11 the Safari app can now read QR codes! (In addition to the Camera App). Just browse to a page with...
Read more >When scanning a url/phone number qr code, is there anyway ...
My question is, is there anyway to force the iPhone to ask you to search the context or copy the context only, even...
Read more >Nissan app developer busted for copying code from Stack ...
A developer working on the NissanConnect EV mobile app just got caught red-handed when a verbatim Stack Overflow answer showed up in the ......
Read more >min-height - CSS: Cascading Style Sheets - MDN Web Docs
Safari on iOS 1. Toggle history. Full support. Samsung Internet1.0. Toggle history. Full support. WebView Android4.4. Toggle history. auto.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you so much for the detailed help and your time @gruhn! 🎉
I ended up reducing the width of my wrapper finally to get a decent result on all major phones.
@holy3015 please be more specific. Do you mean other browsers ON iOS?
If so, they are indeed not supported. Please review the READMEs section Browser Support for details.