Commit Graph

266 Commits

Author SHA1 Message Date
Alex Dima
d7f92d9f14 Fixes microsoft/monaco-editor#2339: Listen to focusin and focusout and refresh the dom focus tracker state 2021-11-18 22:43:24 +01:00
Tyler James Leonhardt
68957a66bb add ability for embedders to specify urls that should open in a popup with opener (#136383) 2021-11-04 10:16:27 -07:00
Benjamin Pasero
e06da97af6 web - refactor lifecycle service to always go through before, will, did shutdown phases 2021-11-02 12:57:03 +01:00
Tyler Leonhardt
dcb7d85c0a allow type in dompurify config so that issue-reporter can work again (type="checkbox" & type="text") fixes #133281 2021-09-17 14:27:45 -07:00
Benjamin Pasero
19091ceccf debt - reduce some queues that seem not needed anymore (#133173) 2021-09-15 18:05:03 +02:00
Matt Bierner
474d4951d8 Switch to dompurify for sanitizing markdown content (#131950)
* Switch to dompurify for sanitizing markdown content

Switches us from using `insane` to instead use `dompurify`, which seems to be better maintained and also has some nice features, such as built-in trusted types support

I've tried to port over our existing sanitizer settings as best as possible, but there's not always a 1:1 mapping between how insane works and how dompurify does. I'd like to get this change in early in the iteration to catch potential regressions

* Remove logging and renaming param

* Move dompurify to browser layer

* Fixing tests and how we check valid attributes

* Allow innerhtml in specific files

* Use isEqualNode instead of checking innerHTML directly

innerHTML can return different results on different browsers. Use `isEqualNode` instead

* Reapply fix for trusted types

* Enable ALLOW_UNKNOWN_PROTOCOLS

I beleive this is required since we allow links to commands and loading images over remote

* in -> of

* Fix check of protocol

* Enable two more safe tags
2021-09-03 12:17:02 -07:00
Akat
77905c850e fix some typo in comments, renaming few methods (#130470) 2021-08-11 17:57:48 -07:00
rebornix
130ba00dc7 fix #125235. Add zindex const enums 2021-08-05 16:16:48 -07:00
Matt Bierner
494cbbd02d Organize imports in vs/base 2021-08-04 12:28:27 -07:00
Matt Bierner
27858a0faf Remove the built-in markdown rendering for notebooks (#128806)
This switches our notebooks to always use contributed markdown rendering instead of our built-in markdown renderer

We'd held off on switching over due to accessibility. I've tried to address this using the `aria-describedby` attributed to link the markdown container with a copy of rendered (and sanitized) html from the webview.
2021-07-16 15:44:04 -07:00
João Moreno
4168941dee remove domEvent
related to #123487
2021-06-09 16:37:09 +02:00
Alexandru Dima
37a12c9b08 Merge pull request #121557 from ValeraS/fix/safari-media-query
fix: use addListener instead of addEventListener to to observe media query lists
2021-05-12 15:56:41 +02:00
Alex Dima
2abf8d3779 Introduce addMatchMediaChangeListener with support for Safari 13.x 2021-05-12 15:55:52 +02:00
Alex Dima
0a2f87623d Restore behavior of BrowserWindow.setupOpenHandlers (see microsoft/monaco-editor#2474) 2021-05-12 15:46:03 +02:00
Alex Dima
579cf91f0a Fixes microsoft/monaco-editor#2474: Use 'noopener' when calling window.open 2021-05-12 15:45:55 +02:00
Benjamin Pasero
133ae5ecee explorer - consolidate upload/download code and provide a "Upload..." action (web)
cc @isidorn
2021-05-10 10:55:39 +02:00
SteVen Batten
244eccdbcc fixes #122520 2021-05-07 11:52:05 -07:00
isidor
dbed1fbe95 fixes #122390 2021-05-07 16:54:57 +02:00
isidor
6101771809 #118731 2021-04-20 16:02:07 +02:00
Benjamin Pasero
ab27efcc9f use new types for browser fs 2021-04-20 07:46:57 +02:00
Matt Bierner
e1f0f8f513 Add override keyword in codebase (#120755)
For #120675

This uses a script to add the override keyword to places that need it in the codebase

Note that we can't enable the --noImplicitOverride setting yet since there are still around 200 errors that require further attention
2021-04-08 10:05:20 -07:00
Alexandru Dima
f1d92e7896 Remove Edge Legacy workarounds 2021-02-22 16:57:41 +01:00
Matt Bierner
094777f392 Fix alt for menus inside of webviews (#116830)
Fixes #104329

This fixes two things:

- Keyup events from webviews were not dispatched back to the main window. We usually listen on keydown but the menubar listeners needs both keydown and keyup

- Instead of listening on document.body for keypress events, we need to listen on window
2021-02-18 19:05:47 -08:00
SteVen Batten
ae0cfa4ec4 fixes #115810 2021-02-05 10:54:47 -08:00
Martin Aeschlimann
684f61b456 Allow to contribute to icon registry from icon contribution point. Fixes #114942 2021-02-04 15:16:57 +01:00
Alexandru Dima
b82933a1d2 Limit to 8ms (120fps) 2021-02-01 15:46:09 +01:00
Alexandru Dima
0ac7f0ee83 Merge branch 'master' into tacticaldan/scrollingPerformance 2021-02-01 15:37:38 +01:00
SteVen Batten
20f8e59d69 fixes #112347 2021-01-27 11:26:49 -08:00
TacticalDan
601161f8dd Reduce arbitrary event limiter from 16ms down to 4.16666 (support for monitors up-to 240hz) #107016 2021-01-25 14:43:58 -07:00
Alex Dima
de11a7dec6 Rename isEdge to isEdgeLegacy (see https://support.microsoft.com/en-us/help/4533505/what-is-microsoft-edge-legacy) 2021-01-22 17:49:49 +01:00
Benjamin Pasero
d7ddcd1e08 debt - cleanup WebFileSystemAccess#supported 2021-01-22 14:28:20 +01:00
Johannes Rieken
51ea16966b 💄 remove appendChildren infavor of append, fyi @bpasero 2021-01-05 16:43:52 +01:00
Johannes Rieken
c46eca1dd3 Merge pull request #113518 from nrayburn-tech/update-dom
update dom to use newer methods
2021-01-05 16:20:59 +01:00
Benjamin Pasero
c4ea0b5590 fix some spelling mistakes 2021-01-05 10:36:10 +01:00
Alexandru Dima
a1760b1a6c Merge branch 'master' into update-dom 2021-01-05 09:27:23 +01:00
Alexandru Dima
d746f2d277 Fixes microsoft/monaco-editor#2220 2020-12-29 11:14:50 +01:00
Nick Rayburn
0439aef7b3 update dom to use newer methods 2020-12-28 20:35:17 -06:00
Benjamin Pasero
039f15a0f9 💄 2020-12-10 09:17:02 +01:00
Johannes Rieken
a0cbecb188 Merge pull request #112069 from engelsdamien/master
Updates tsec and rewrites sinks assignement
2020-12-09 11:35:58 +01:00
Rachel Macfarlane
c643c433e8 Remove extra whitespace in dom.ts 2020-12-08 11:49:53 -08:00
YtCsj
3a47fc387a bug fix, see #112013 (#112015)
* bug fix, see  #112013

* Update dom.ts

fix 1.51.0 new multibyteAwareBtoa function, see # #112013

* Update dom.ts

format document
2020-12-08 08:52:40 -08:00
Benjamin Pasero
affd21e65a tabs - partially take changes from PR 106448 to reduce diff 2020-12-08 17:20:24 +01:00
Damien Engels
5865aeaa7b Rewrites Trusted Types sink assignements
Moves the casts to the sink assignement expression so that tsec can
recognize it.
2020-12-08 08:40:05 +01:00
Jackson Kearl
0921f711c3 Add GettingStartedService/Registry and initial getting started UI (#111175)
* WIP -Getting Started Registry

* Initial idea of how registry/service will work

* Getting started with Getting Started

* Add telemetry and touch up enablement flag

* Add contrib as startup editor

* Move to allowing static Getting Start blob

* No newline

* Remove unused enum
2020-11-25 14:05:49 -08:00
Matt Bierner
f23e47b9a2 Extract getParentFlowToElement 2020-11-10 17:50:11 -08:00
Matt Bierner
3338ff4e18 Fixes navigation commands for webviews
Fixes #100536

These commands currently do not work because:

- The use the `hasFocus` check in layout.ts
- This looks at the active element and checks if the active element has a parent in the editor dom
- However webviews are outside of the normal dom flow (since they cannot be reparented without being destroyred)

To fix this, this PR adds allows dom node to point to their explicit parent using `setParentFlowTo`. Instead of a normal ancestor check, we then check ancestors while observing the flow to parents of node

The webview element is then update to have a parent flow to that points at its editor node
2020-11-06 13:35:59 -08:00
Johannes Rieken
1a130d2c17 remove unused code,https://github.com/microsoft/vscode/issues/103454 2020-10-27 18:09:54 +01:00
Daniel Imms
cece809137 Remove deprecated methods and refs in terminal
Fixes #103454
2020-10-27 09:54:32 -07:00
Benjamin Pasero
58050c8c53 web - adopt modifier key emitter for shutdown prevention 2020-10-23 13:52:21 +02:00
isidor
ff805b3a35 Consolidate ModifierKeyEmitter and AlternativeKeyEmitter
fixes #109062
2020-10-23 12:13:44 +02:00