Commit Graph

2116 Commits

Author SHA1 Message Date
Samuel Mannehed 208e34bc34 Update chinese translation strings
Thanks to @QQ2017 and @wavezhang for helping out with correcting these.
2020-01-02 13:18:24 +01:00
Samuel Mannehed 11ae8f0ef4 Add comment for browser and platform detection 2020-01-02 11:30:34 +01:00
Samuel Mannehed c32d4f3cd0 Add short description at the top of browser.js 2020-01-02 11:30:34 +01:00
Samuel Mannehed e52a278ed7 Properly detect scrollbar gutter
As a rule, instead of hard-coding a behavior on specific platforms we
should do dynamic detection.

This commit moves away from always hiding scrollbars on Android and iOS
and instead detects the rendered width of scrollbars in the browser.
2020-01-02 11:30:18 +01:00
Samuel Mannehed 8f230f45cc Remove Google Chrome Frame plugin compatability
Chrome Frame has been retired we so we can remove it from this
compatability tag.
2019-12-31 02:15:07 +01:00
Samuel Mannehed 78bbf6bad2
Restore X-UA-Compatible meta tag to vnc_lite
It's still required since without this IE's default setting for "Display intranet web pages in compatibility mode" will cause errors.
2019-12-31 02:07:31 +01:00
Samuel Mannehed 3a64043f28
Restore X-UA-Compatible meta tag to vnc.html
It's still required since without this IE's default setting for "Display intranet web pages in compatibility mode" will cause errors.
2019-12-31 02:06:02 +01:00
Pierre Ossman 49db41ea4b Allow cursor to be updated while connecting
We haven't got a server provided cursor at this point, but we might
have done something local, e.g. enabled the dot cursor.
2019-12-30 09:30:00 +01:00
Pierre Ossman d507d1415e Make sure "undefined" can be a default parameter value
Lower layers can consider null to be a valid value, when we'd rather
they treat the value as not set.
2019-12-25 12:10:21 +01:00
Pierre Ossman c4eb4ddcfe Handle slow loading of images
Internet Explorer seems to flag images as loaded prematurely, which
can result in rendering bugs. We can detect this by looking at the
dimensions though.
2019-12-23 15:52:54 +01:00
Pierre Ossman 4babdf33bd Validate decoded image dimensions
They are expected to be a certain size, so verify this so no server
tries to do something broken.
2019-12-23 15:42:02 +01:00
Pierre Ossman b8d1a8bb57 Avoid using Array.includes()
Internet Explorer doesn't have this method. Use the safer indexOf()
instead.
2019-12-23 15:42:02 +01:00
Samuel Mannehed 2cf82a5c8e Build in the behavior to ignore decodeUTF8 errors
Makes the code clearer and more explicit in intent.
2019-12-23 10:27:40 +01:00
Pierre Ossman 06a8f7d91a Use undefined as the default value for password
An empty password is techincally legal, and now supported by the
RFB core, so we cannot use that as a placeholder for "no password".
2019-12-23 09:35:51 +01:00
Samuel Mannehed dbbb676da9
Peter is no longer part of the noVNC team 2019-12-21 00:26:57 +01:00
Samuel Mannehed 84a8c1b0cc
Merge pull request #1327 from vanym/decodeUTF8_try_catch
Fixes exception when desktop name contains non-utf8 character
2019-12-07 20:12:27 +01:00
VanyM ff1b10ca66
Add try catch in every place that uses decodeUTF8 2019-12-06 09:44:11 +03:00
Chris "Koying" Browet 1c9826140a Add support for Unix Tight auth 2019-12-05 15:46:31 +01:00
Chris Koying Browet 5b453ed4a8 Expand password dialog to work for usernames too
Some VNC authentication schemes use usernames, our UI should support
these.
2019-12-05 15:46:24 +01:00
Samuel Mannehed b39caa7469
Merge pull request #1318 from chrisjdev/emptyPassword
Allow connecting with empty string credentials
2019-12-05 12:15:43 +01:00
Chris J 01d4514dee Allow connecting with empty string credentials
Checking for undefined instead of falsy. That way an empty strings are allowed.
2019-12-05 12:13:11 +01:00
Samuel Mannehed 80b078c469 Add encodeUTF8 function to core/util/strings.js 2019-12-04 10:37:11 +01:00
Pierre Ossman 9f557f5280 Make Cursor.detach() safe to call when not attached
Avoids having checks in higher layers.
2019-11-29 10:08:15 +01:00
Samuel Mannehed 94c89284fc
Fix chinese translation errors
Thanks to @QQ2017 for providing the translation strings
2019-11-28 12:51:32 +01:00
Samuel Mannehed b17f6c6929 Simplify logic for status hierarchy
Removes unnecessary variable
2019-11-25 17:03:55 +01:00
Samuel Mannehed afa1f8a2ab Ensure warning status timeouts are honored
When showing a new status popup we want to set a timer for how long to
show it. In cases where we show many statuses in a fast succession we
need to remove any running timeouts when showing a new one.

There are exceptions when new statuses won't be shown, and thats if a
more severe status is already showing, i.e and error or a warning.

Warnings can still have timeouts. There was a bug that occured when we
tried to show a normal status while a warning was showing. The bug
caused the warning status timeout to be removed even if the normal
status was never shown. We should only remove running timeouts if we're
actually going to show a new status.
2019-11-25 16:38:03 +01:00
Pierre Ossman 686c8d259a Merge branch 'babel' of https://github.com/CendioOssman/noVNC 2019-11-12 14:12:18 +01:00
Pierre Ossman d01ecc18d5 Don't use arrow functions in legacy loader
The browsers that need the legacy code do not support such fancy
modern things.
2019-11-12 14:05:55 +01:00
Pierre Ossman 66ab0d98d7 Load support scripts first
E.g. SystemJS requires the Promise polyfill, so make sure all our
support files are loaded first.
2019-11-12 14:05:55 +01:00
Pierre Ossman 0dd439a874 Upgrade to latest babel
There has been a lot of renaming and restructuring in babel, so we need
to modify our code to handle the latest version. We also need to adjust
the way we build our babel worker as babel itself no longer runs in older
browsers such as Internet Explorer.
2019-11-12 14:05:55 +01:00
Samuel Mannehed ae127d8a38
Merge pull request #1319 from wavezhang/patch-2
Update zh_CN.po
2019-11-11 16:46:36 +01:00
Pierre Ossman b88a92afe8 Always include Promise polyfill for legacy browsers
It is now used by our general code and not just by the conversion
routines, so we need to make sure it is always included for the
old browsers.
2019-11-11 13:36:30 +01:00
Pierre Ossman 6b20803401 Clean up handling of untransformed files
This control flow is difficult enough as it is to follow. Move the
handling of the untransformed files to a separate block to make it
slightly easier to understand.
2019-11-11 13:33:47 +01:00
Pierre Ossman 8cfa673d94 Remove redundant "no copy" check
We also check this list as a filter to walkDir(), so no need for the
extra check here.
2019-11-11 13:32:19 +01:00
Pierre Ossman c6e37040de Use proper backticks for generating legacy script tags 2019-11-11 10:01:43 +01:00
wavezhang 9653598af7
Update zh_CN.po
fix spell errors, improve translations
2019-11-08 14:08:23 +08:00
Alex Tanskanen a6304f91d0 Fix missing caps lock events on iOS
Caps Lock on iOS only trigged key release or key press events.
When it's clicked it would only send keydown, and next time
it would only send keyup and so on. It should send both a key press
and a key release.

Also added the unit tests for macOS since those were missing.

Co-Authored-By: Alex Tanskanen <aleta@cendio.se>
2019-11-07 16:44:26 +01:00
Samuel Mannehed c15502525e Add README to app/locale warning not to modify 2019-11-07 13:07:45 +01:00
Alex Tanskanen 175b843b66 Add "macOS shuffle" to iOS as well
Since iOS functions like macOS with regards to Alt behaving like AltGr,
we need the same workaround on iOS as well.
2019-11-04 14:22:46 +01:00
Pierre Ossman ccb511a527 Handle missing Shift events on Windows
This is a bug in the OS that leaks through to the browsers. We need
to fake a Shift release here to avoid Shift getting stuck in the remote
session.
2019-11-04 10:17:45 +01:00
Pierre Ossman 3388c92c7f Send NumLock on macOS, even though the key is Clear
There is no obvious choice what works best here, but this is what
TigerVNC has been doing for years without complaints. Let's follow
them until we get reports that this doesn't work well.
2019-11-01 13:13:35 +01:00
Pierre Ossman 1096555414 Fix typo for MailSend key 2019-11-01 10:49:19 +01:00
Pierre Ossman ebee9cddbf Update to latest UI Events key specification 2019-11-01 10:25:23 +01:00
Pierre Ossman 5736ea0bd5 Fix AltGr for a few more keys in IE and Edge
Some keys apparently send 'Unidentified' rather than an unshifted value.
Make sure those are also handled. Examples are \ and | on a Swedish
keyboard.
2019-11-01 09:59:02 +01:00
Samuel Mannehed 94a01b0ae0 Keep the virtual keyboard after using extra keys
If using the extra keys always gives focus to the screen then an
on-screen keyboard would be closed. When using on-screen keyboards we
instead want to give focus to our virtual keyboard input element.
2019-10-31 16:24:06 +01:00
Pierre Ossman 8c51e9a8a2 Revert iOS keyup workaround
It seems Apple has fixed their buggy keyup events, so remove the
workaround and allow keys to be kept pressed again.

This is a revert of 9e99ce126c.
2019-10-31 15:36:40 +01:00
Pierre Ossman 9d956e9198 Handle broken numpad delete key in Chrome 2019-10-31 14:51:36 +01:00
Pierre Ossman dd4341fe67 Explain why Clear maps to KP_Begin 2019-10-31 14:12:58 +01:00
Pierre Ossman 758399050d Try to handle Meta key properly
The standards have unfortunatly caused some confusion between the Windows
key and the original Meta key. Try to handle the common case sanely at least.
2019-10-31 14:12:58 +01:00
Samuel Mannehed 1dd1bf0306
Merge pull request #1312 from samhed/master
Fix so that you can use the keyboard after using the extra keys
2019-10-28 10:45:08 +01:00