Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

ScanBarcode() autofocus bug on iPad

I built a barcode scanner that runs fine on my Galaxy Note 8, but on my classroom iPad (4th Gen) with iOS 10.3.3 installed. I'm hitting a bug I think. My app is designed to scan/enter two seperate barcodes into two separate text input controls before I patch them. Both scans are triggered by two separate buttons. The bug always occurs on my 2nd scan, the iPad loses its autofocus and I can't scan a rather long barcode. Autofocus always works on the first scan, regardless of which button is pressed, but then it stops working afterwards.

Community Support
Community Support

Re: ScanBarcode() autofocus bug on iPad


Both scans are triggered by two separate buttons. 


Could you please explain a bit for the setup of the triiger?

Is the following article that you have followed to implement it?

Create a barcode scanning app in minutes!


Besides, could you please take a try to upgrade the IOS Version to the current version 11.4.1?

For testing purpose, if possible, find a testing device to test that before upgrading the production one.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advocate I
Advocate I

Re: ScanBarcode() autofocus bug on iPad

Hi Michael, here are my two buttons:
Button for scanning student ID: OnSelect=UpdateContext( {StudentID: ScanBarcode() } )
Button for scanning Instrument Barcode: OnSelect=UpdateContext( {InstrumentBarcode: ScanBarcode() } )
Both the StudentID and InstrumentBarcode are then patched to a Sharepoint list. Scanning twice and autofocus works fine on my Note8 phone and my wife's iPhone running iOS 11.4.1.
Apple doesn't support iOS 11 on a 4th gen iPad, so I all get on my classroom iPads is 10.3.3

Helpful resources

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,268)