Samuel Mannehed [Sat, 20 May 2017 16:59:47 +0000 (18:59 +0200)]
Clear the password input field
If a user disconnects but leaves the browser tab open, the password
input field would still contain the password for future connections.
We now clear the input field after reading the password into memory.
Pierre Ossman [Mon, 15 May 2017 12:40:28 +0000 (14:40 +0200)]
Fix bootstart of input field
It wasn't working properly anymore because it expected to be triggered
by the "load". But we now register that event listener long after the
"load" event has already fired.
Samuel Mannehed [Fri, 12 May 2017 10:52:05 +0000 (12:52 +0200)]
Catch errors for when we can't play bell
Many browsers, for example Chrome on Android will not allow audio to
play unless it's initiated from a user action. It is not reasonable to
display an error for this. Fixes issue #821.
Pierre Ossman [Fri, 27 Jan 2017 11:52:24 +0000 (12:52 +0100)]
Clean up AltGraph handling
It doesn't need to be this general as the issue is mostly about
Windows. Also use the same modifier shuffle that RealVNC and
TigerVNC uses to get macOS working well.
Pierre Ossman [Fri, 27 Jan 2017 09:49:04 +0000 (10:49 +0100)]
Remove modifier synchronisation
The fields provided cannot tell us if it is the left or right
version of the key that's pressed, so they are inherently unreliable.
It is also not a huge problem in practice as we'll get in sync on
the next press or release of the modifier.
Pierre Ossman [Tue, 24 Jan 2017 16:18:43 +0000 (17:18 +0100)]
Improve lookup of special keys
Look up keys that are independent of layout and state first,
followed by keys that are only mild variations in layouts.
This is more robust as there might be multiple physical keys
generating the same symbols, and Keysyms don't map directly to
Unicode in all cases.
At the same time switch over to using the modern, standardised
'code' field for lookup.
Pierre Ossman [Wed, 25 Jan 2017 10:29:08 +0000 (11:29 +0100)]
Improve character keysym lookup
Use the more modern 'key' field, and remove some legacy fallbacks
that are no longer required. This also removes the "stall" mechanism
as it is not needed with current browsers.
Philipp Hahn [Wed, 3 May 2017 10:01:05 +0000 (12:01 +0200)]
Remove double unescaping of title
Commit fa5b334dcbe7a5dab21580b54cc2f5f142600379 by Joel Martin changed
getQueryVal() to always decode the value using decodeURIComponent(), but
unescape() is still used for extracting the title, leading to
double-unescaping.
As unescape() is deprecated anyway, remove the last user.
Cc: Joel Martin <github@martintribe.org> Cc: Anthony Young <sleepsonthefloor@gmail.com>
Samuel Mannehed [Fri, 21 Apr 2017 13:23:18 +0000 (15:23 +0200)]
Fix panning test for high DPI devices
There is a drag-threshold in the panning code which the tests didn't
account for. This caused the tests to fail when window.devicePixelRatio
was higher than 1.
Samuel Mannehed [Tue, 11 Apr 2017 08:53:06 +0000 (10:53 +0200)]
Properly restore the default style
Setting a style to null does restore it in FF, Chrome, Safari and Edge.
But it does not work in Internet Explorer. The proper way to restore to
default values is to set it to the empty string. This works in all
browsers. Fixes issue #808.
Samuel Mannehed [Wed, 5 Apr 2017 12:00:59 +0000 (14:00 +0200)]
Always send mouseUp events properly
If down is false we can't just toggle the current internal state, even
though this is correct most of the time. There are cases where we don't
get the down event and thus won't have a correct internal state. For
example, when clicking in the session after using the clipboard
textarea.
If down is false, we always want to send a mouse event with the button
in 'up'-state.
Solly Ross [Wed, 1 Mar 2017 21:26:15 +0000 (16:26 -0500)]
Fix vnc_auto.html
This commit fixes `vnc_auto.html` to work with the new changes.
Note that it is not translated over when `--with-app` is used
on `util/use_require.js`. We'll probably want to deprecate it,
or do some longer-term cleanup.
Solly Ross [Sat, 11 Feb 2017 21:49:03 +0000 (16:49 -0500)]
Optimize ES6 Module Loader Polyfill
This commit makes the ES6 module loader polyfill use Web Workers,
so that Babel doesn't block the browser from animating. It also
uses localStorage to cache the compiled results, only recompiling
on source changes, so it makes loading faster while developing noVNC.
This includes a vendored copy of the ES6 module loader, modified as
described above.
Solly Ross [Sun, 5 Feb 2017 17:34:47 +0000 (12:34 -0500)]
Update tests to work with new structure
This updates the tests to work with the new structure, and removes the
old `utils/run_from_console.js` files in favor of just using Karma
directly. The Karma debug page now displays the normal mocha HTML, so
we can use that instead of the HTML generation functionality of the old
test runner.
Note that PhantomJS does not work at the moment (PhantomJS 1.5 should
make it possible to test on PhantomJS again).
Solly Ross [Sat, 4 Feb 2017 22:40:18 +0000 (17:40 -0500)]
Remove WebUtil.load_scripts
The only remaining user of WebUtil.load_scripts was for loading
localisation. Instead, we now load the localization information
over XHR as a JSON blob.
Solly Ross [Sat, 4 Feb 2017 22:12:00 +0000 (17:12 -0500)]
Allow transforming to any format
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules. The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
Pierre Ossman [Mon, 6 Mar 2017 14:54:00 +0000 (15:54 +0100)]
Use PNG for mouse cursors
The browsers' support for Microsoft's cursor format is a bit spotty,
so use the more common PNG format instead. This also allows us to
use a Canvas to generate the image, rather than coding it by hand.
Solly Ross [Sat, 4 Feb 2017 04:59:44 +0000 (23:59 -0500)]
Use ES6 modules natively via Polyfill
This commit introduces the "Browser ES Module Loader" polyfill
to support developing with native ES6 modules, without any compilation
step (files are passed through Babel in the browser). This should not
be used in production -- a pre-compiled version passed through babel
ahead of time (as produced by the `npm install` hook or
`utils/use_require.js`) should be used instead.
Pierre Ossman [Thu, 23 Feb 2017 15:29:16 +0000 (16:29 +0100)]
Remove 512x512 icon
It is not a launcher icon, but rather used for display on Google
Play. As such it is not needed and removing it mitigates the issue
of some buggy browsers downloading each and every listed icon.