question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QR scan area overflowing in Safari on iOS

See original GitHub issue

I’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).

screenshot 2018-09-09 15 04 09

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:

photo-2018-09-09-15-06-25

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:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dakshshah96commented, Sep 11, 2018

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.

0reactions
gruhncommented, Nov 16, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found