Commit Graph

1399 Commits

Author SHA1 Message Date
Frederik Carlier
14ecdc62b4 Only load ES6 module loader polyfill if needed
Safari and Chrome now have native support for modules, so we need to make sure we only load our polyfill when actually needed.
2017-09-29 14:09:25 +02:00
Samuel Mannehed
0242c03280 Restore logging properly after log tests
Our logging module keeps its own copy so we need to call init_logging in
the test cleanup to update things.
2017-09-28 14:11:44 +02:00
Samuel Mannehed
13d9108f91 Setup chai extensions centrally
They have global effects so make that clear by doing the setup in a
single place.
2017-09-28 14:10:19 +02:00
Samuel Mannehed
0aaf59c2f9 Upgrade and fix sinon.js
Converted version downloaded from sinonjs.org. Fixed version that
doesn't register itself on the global object. This forces all modules to
do a proper import.
2017-09-28 14:05:20 +02:00
Samuel Mannehed
05f032d1dd Merge pull request #896 from novnc/combinemousewheel
Combine small mouse wheel events
2017-09-27 15:37:04 +02:00
Samuel Mannehed
d92b701393 Remove unused imports 2017-09-17 18:23:57 +02:00
Samuel Mannehed
28b004fd70 Combine small mouse wheel events
The VNC protocol can't handle different deltas or speeds for a mouse
wheel event. When using a device that sends a lot of small mouse wheel
events, instead of fewer larger steps, the effect was that mouse wheel
scrolling was way to sensitive.
This patch looks at the delta of wheel events and doesn't send events
until the combined delta has passed a threshold. Single events that
doesn't pass the threshold get sent after a timeout in order to not
loose any events.

Fixes #577.
2017-09-17 18:23:57 +02:00
Samuel Mannehed
c1e2785fb6 Split devices.js into keyboard.js and mouse.js 2017-09-17 18:23:57 +02:00
Samuel Mannehed
c509e6d9c8 Add tests for mouse module 2017-09-17 18:23:57 +02:00
Samuel Mannehed
a49ade5fa0 Rename setting_clip to setting_view_clip
Clarifies the purpose of the setting in order to avoid mix ups with
clipboard related things.
2017-09-07 09:01:52 +02:00
Samuel Mannehed
409b7fb97e Remove unused variable
The use of this variable was removed in b18ef8162e
2017-09-07 09:00:15 +02:00
Pierre Ossman
0ff97c1a24 Include optional log message on errors 2017-09-05 14:31:37 +02:00
Pierre Ossman
b05a7b1dcf Handle new style recordings
Newer recordings are always binary and don't include the encoding
specifier.
2017-09-05 14:31:10 +02:00
Pierre Ossman
d1a1e0e529 Adjust scaling when session size changes
Session size changes can be initiated from the server, and not just
from the client. Make sure we update the scaling when this happens.
2017-08-16 11:00:04 +02:00
shaneharris
b5c982ea42 fix typscript error - the only one. (#837)
* fix typscript error TypeScript error: novnc/core/rfb.js(1012,17): Error TS7027: Unreachable code detected.

* Update rfb.js
2017-08-05 02:29:50 +02:00
Samuel Mannehed
74a29f3ff5 Make sure the control bar hint is centered
Fixed positioned flex boxes are not positioned correctly in Safari. Add
the normal top 50% translate -50% method.

Fixes issue #848.
2017-07-26 17:06:27 +02:00
Pierre Ossman
edb7879927 IE compatibility fix for babel workers
IE doesn't support document.currentScript, so we need to have a fallback.
2017-07-21 15:03:52 +02:00
Pierre Ossman
be70fe0a3d Only send QEMU Extended Key Event if we have a scan code
Servers will assume that a scan code is present if this message type
is used, so fall back to the standard key event message if we don't
know the scan code.
2017-07-07 15:06:13 +02:00
Pierre Ossman
4093c37f28 Ignore compositing key
keyCode 229 is commonly used with virtual keyboards when the
system cannot map things to a specific key. As such we should
treat it as 'Unidentified'.
2017-07-07 15:04:44 +02:00
Pierre Ossman
8f8c1803ff Merge branch 'qemufix' of https://github.com/CendioOssman/noVNC 2017-07-06 13:07:19 +02:00
Pierre Ossman
2bf4cf5a20 try/catch guard for QEMU keyboard test
Safari on older iOS doesn't support creating KeyboardEvent objects,
so put a guard in to avoid crashes.
2017-07-06 13:00:00 +02:00
Pierre Ossman
7cac5c8e9f Fallback for missing keypress events
IE and Edge have some corner cases (e.g. Ctrl+key) where we get
insufficient information in the keydown event, and we never get
a keypress event. Try to make a guess of the key in those cases.
2017-07-06 13:00:00 +02:00
Pierre Ossman
7e79dfe425 Track keys using keyIdentifier
This is necessary on older iOS where code isn't provided.
2017-07-06 13:00:00 +02:00
Pierre Ossman
1524df89ad Adjust import of vendor/ modules in NPM package
We move the files in core/ up one directory level so we need to adjust
the imports from vendor libraries.
2017-07-04 10:10:36 +02:00
Pierre Ossman
d5c5b4aab7 Properly use babel opts
We prepared an options object for babel, but didn't include it properly
in the final call to babel.
2017-07-04 10:09:04 +02:00
Pierre Ossman
9e2f733f7d Don't include unmodified vendor directory in NPM package
It contains ES6 modules, so it won't be useful as-is on NPM.
2017-07-04 10:08:21 +02:00
Pierre Ossman
e7c4d669f0 Handle iOS special keys 2017-06-21 14:02:24 +02:00
Pierre Ossman
9e99ce126c Fake key release for iOS hardware keyboards
iOS sends decent key down events, but junk key up events when a
hardware keyboard is used. This confuses the key tracking as a
corresponding release is then never detected. To work around this
we'll treat the hardware keyboard like the virtual ones and send
the key release right away.
2017-06-21 13:58:53 +02:00
Pierre Ossman
637a282be5 Scroll error stack trace
Make sure we get the stack trace without distortions by wrapping, or
cropping because it flows out of the screen.
2017-06-15 13:49:27 +02:00
Pierre Ossman
55b459b479 Merge branch 'ios9' of https://github.com/CendioOssman/noVNC 2017-06-08 10:43:53 +02:00
Solly Ross
a5c366b834 Merge pull request #838 from novnc/infra/fix-travis-sauce
Fix Travis-Sauce Connection
2017-06-05 14:28:28 -04:00
Solly Ross
b081ea7266 Fix Travis-Sauce Connection
Somethings got messed up in the Travis-Sauce tunnel setup.  This should
fix it by re-adding the Sauce credentials.  It also updates the config
to explicitly pass auth information instead of via environment
variables.
2017-06-05 13:41:31 -04:00
Pierre Ossman
858ea4a774 Avoid use of 'let' and 'const'
They are not supported on older browsers, e.g. iOS 9.
2017-06-02 15:41:37 +02:00
Pierre Ossman
493ad1a24b Avoid nested function declarations
Not supported in older browsers, e.g. iOS 9.
2017-06-02 15:19:37 +02:00
Pierre Ossman
844e983916 Limit use of keypress fallback
It was preventing key events for dead keys, so try to reduce it to
only cases where we must use it.
2017-06-02 14:38:16 +02:00
Pierre Ossman
459ed0083f Allow key events without symbols
They can still be useful if the server makes use of the keycode instead.
2017-06-02 14:37:36 +02:00
Pierre Ossman
255fbe0c9e Fix traffic management in playback tests 2017-06-01 12:50:00 +02:00
Pierre Ossman
39193b2878 Merge branch 'record' of https://github.com/CendioOssman/noVNC 2017-06-01 10:29:19 +02:00
Pierre Ossman
dfa7826d72 Get XT scan code mappings from the keycodemapdb project
This way we can work together with other projects that need this kind
of mapping.
2017-05-31 16:20:24 +02:00
Samuel Mannehed
beec05ce7a Merge pull request #831 from samhed/visualhint
Add hint that the control bar can be moved
2017-05-30 10:19:42 +02:00
Samuel Mannehed
bbc1648c7a Add hint that the control bar can be moved
The control bar can be dragged to the other side, this isn't obvious
however. This adds a hint on the opposite side in the form of a subtle
glowing half-ellipse.
2017-05-29 15:57:13 +02:00
Pierre Ossman
1433360ad9 Use one entry per file in transpile cache
This avoids any risk of the cache key and contents getting out
of sync.
2017-05-22 14:01:44 +02:00
Pierre Ossman
55d5353f90 Remove #nocache system as it is unused 2017-05-22 13:48:59 +02:00
Pierre Ossman
7c1f1a9cef Revert recording file format changes
Change back to the old, non-modular recording file format. The new
method doesn't work reliably and there are existing recordings already
out there that we might want to handle.
2017-05-22 13:44:48 +02:00
Samuel Mannehed
c23665dd82 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.
2017-05-20 19:05:46 +02:00
Pierre Ossman
aadcf47d6f Handle loading web workers in any path
The URL is interpreted relative the current page, not relative
the current script. So we need to have some extra code in order to
allow the module loader to be agnostic to its path.
2017-05-19 14:39:49 +02:00
Pierre Ossman
777df7c274 Don't fail on babel cache storage errors
It is just a cache after all, so failures are not fatal. Users will get longer
load times, but at least they'll get a page.
2017-05-16 14:07:03 +02:00
Samuel Mannehed
b0061a3c49 Revert "Remove shadow from logo"
This reverts commit 7c44f86dcd.
2017-05-15 14:57:33 +02:00
Pierre Ossman
55988e7aec 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.
2017-05-15 14:42:28 +02:00
Samuel Mannehed
afb621d577 Add missing semicolon 2017-05-13 01:56:35 +02:00