aboutsummaryrefslogtreecommitdiff
path: root/PuzzleApplet.java
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-02-20 19:16:35 +0000
committerSimon Tatham <anakin@pobox.com>2023-02-20 19:21:29 +0000
commit5c858253f9456b970be5d5ef3e7df727d39e3da7 (patch)
treeb6fe3c9a0a25e2855d68c3b22783dd17efb8a735 /PuzzleApplet.java
parentbbe866a3819c6a754a5b1d8c5bc5d0701796acfb (diff)
downloadpuzzles-5c858253f9456b970be5d5ef3e7df727d39e3da7.zip
puzzles-5c858253f9456b970be5d5ef3e7df727d39e3da7.tar.gz
puzzles-5c858253f9456b970be5d5ef3e7df727d39e3da7.tar.bz2
puzzles-5c858253f9456b970be5d5ef3e7df727d39e3da7.tar.xz
Fix error about setCapture not existing.
element.setCapture only seems to exist in Firefox. On most other browsers, our attempt to call it must have been generating a whinge in the console log all along. But Ben's commit bb16b5a70ddf77d turned that into a prominent alert box, triggered on every mouse click in the puzzle canvas. Worked around by wrapping both calls to setCapture in a local subroutine which checks if it's there before calling it. Also, setCapture turns out to be deprecated in any case, according to https://developer.mozilla.org/en-US/docs/Web/API/Element/setCapture . It looks as if the non-deprecated version is element.setPointerCapture: https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture But it also looks as if that needs the 'pointerId' field that's only found in 'onpointerdown' events and not 'onmousedown' ones. So including that as an alternative will be a bigger job.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions