I created an HTML page that features a canvas
element where I am drawing a roulette using JavaScript
After checking the CanIuse website, I learned that canvas functionality is supported in Firefox 68 and Safari 4 to 13
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RuLetras 2020.06.20 - MGG</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
</head>
<body style="font-size:14px">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-lg-12">
<label for="txtOptions">Roulette Options:</label>
<input id="txtOptions" type="text" value="a,e,i,o,u">
<button id="btnCreate" type="button">Create</button>
<br>
<label for="selectRoulette">Use Roulette:</label>
<select id="selectRoulette" name="selectRoulette">
</select>
<button id="btnChangeColors" type="button" disabled>Change Colors</button>
<button id="btnSpin" type="button" disabled>Spin!</button>
</div>
<div class="col-md-12 col-sm-12 col-lg-12">
<canvas id="myCanvas" style="border:0px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
</div>
</div>
</div>
<script type="text/javascript" src="ruletra.js"></script>
</body>
</html>
I used JavaScript to resize the canvas to fit the width and height of the inner window. I also filled the background with gray to ensure the canvas is being drawn correctly.
The published version can be viewed at . It displays correctly on Chrome Mobile, but on Firefox Mobile 68.9.0 and Safari, only the form is visible, not the canvas with the roulette.
As I am new to debugging HTML and JavaScript on mobile browsers, I am seeking guidance on how to debug or diagnose why the painting is not rendering correctly (similar to accessing Developer Tools)
For this specific issue, any pointers on what might be causing the problem would be greatly appreciated.