When the autoclose bracket addon is enabled, quotes and ] are automatically
inserted, but that wasn't taken into account in the function that is in charge
of setting the input value when the user accept the autocompletion.
This patch should fix this, and add a few tests to makes sure we don't regress.
Differential Revision: https://phabricator.services.mozilla.com/D79126
The console editor uses the codeMirror autoclose bracket addon,
which when the user types a closing bracket and the next char
in the input is the same char, won't insert a new char, but will
only move the cursor.
In such case, the JsTerm code wasn't capturing this key event, and
it could happen that the autocomplete would still be displayed,
which would then lead to some weirdness when the user hits Enter.
In order to fix that, we listen for the keyHandled event, which
is fired one a keypress was handled, and that appear that be fired
for the case I exposed, and isn't triggered when the character is
simply inserted.
A test case is added in one of our test to make sure this works as
expected.
Differential Revision: https://phabricator.services.mozilla.com/D78935
My patch from bug 1599160 changed timing in a way that makes this bug a
perma fail and I'd rather not get it backed out :)
Differential Revision: https://phabricator.services.mozilla.com/D79316
This patch adds a ResizeObserver to the input node, which when triggered
refreshes the codeMirror instance.
This is needed because codeMirror draws specific elements, like the cursor
and selection blocks, and they need to be re-computed if the editor size
changed (the line might have wrapped, and the cursor need to be in a new
position now).
Depends on D78649
Differential Revision: https://phabricator.services.mozilla.com/D78661
CodeMirror does not have an option to automatically remove
the selection when the editor is blurred, which means there
can be a kind-of weird visual glitch when there was a selection
and the user does another selection.
This patch listen for the blur event on the editor, and if there
was a selection, removes it.
The blur event need to be piped down from the sourceeditor.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D78649
Support for `goForward()` and `goBack()` has been removed for `mozbrowser` elements, which were methods that old-RDM used to handle backward/forward navigation. Since the custom implementation of the webNavigation object for old-RDM uses the `WebNavigation` actor as a fallback for APIs that are not supported by `mozbrowser`, we can also do the same for `goForward()` and `goBack()`.
Differential Revision: https://phabricator.services.mozilla.com/D78835
This broke when the main developer tools window was converted from XUL to XHTML. By adding the application role, the window is once again a window, not a document for the accessibility engine.
In addition, while I was here, I fixed the role of the focusable vbox because it is the first thing the user lands on when tabbing, to make it a semantic group, not an "unknown". Since this is probably supposed to be focusable for keyboard users, it is better to have an appropriate role.
Differential Revision: https://phabricator.services.mozilla.com/D79038
Support for `goForward()` and `goBack()` has been removed for `mozbrowser` elements, which were methods that old-RDM used to handle backward/forward navigation. Since the custom implementation of the webNavigation object for old-RDM uses the `WebNavigation` actor as a fallback for APIs that are not supported by `mozbrowser`, we can also do the same for `goForward()` and `goBack()`.
Differential Revision: https://phabricator.services.mozilla.com/D78835
This attribute can only be toggled on top level BrowsingContext.
These are the top level window's, or tab's BrowsingContext.
From DevTools point of view, it should only be toggled by the
Parent Process or Tab target.
Differential Revision: https://phabricator.services.mozilla.com/D78860
To give the whole rules view more structure:
1. Make the container a document so screen readers invoke their reading mode.
2. Give the different section headers a proper heading role.
3. Make each separate item an article so screen readers can navigate them more easily.
4. Give the expander twisty for the pseudo classes a proper label that adjusts depending on whether pseudo classes are expanded or collapsed. Also make it a button for screen readers.
This patch does not attempt to simulate any advanced navigation via the keyboard.
Differential Revision: https://phabricator.services.mozilla.com/D78674
Now that network requests can be displayed as error (for 4XX and 5XX),
this test could get one of those and think we were getting an actual
js error, which makes the test fail.
Excluding network messages from the messages we are checking should
fix the intermittent.
Differential Revision: https://phabricator.services.mozilla.com/D78493