OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
silver
/
main
/
ts
/
ui
/
general
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:48 AM
rwxr-xr-x
📄
AlertBanner.ts
2 KB
02/20/2020 06:38:31 AM
rw-r--r--
📄
Button.ts
5.25 KB
02/20/2020 06:38:32 AM
rw-r--r--
📄
Checkbox.ts
3.22 KB
02/20/2020 06:38:33 AM
rw-r--r--
📄
FormEvents.ts
1.8 KB
02/20/2020 06:38:35 AM
rw-r--r--
📄
FormValues.ts
2.85 KB
02/20/2020 06:38:35 AM
rw-r--r--
📄
HtmlPanel.ts
1.18 KB
02/20/2020 06:38:36 AM
rw-r--r--
📄
Listbox.ts
1.39 KB
02/20/2020 06:38:36 AM
rw-r--r--
📄
NavigableObject.ts
2.09 KB
02/20/2020 06:38:37 AM
rw-r--r--
📄
Notification.ts
6.05 KB
02/20/2020 06:38:37 AM
rw-r--r--
📄
OuterContainer.ts
6.77 KB
02/20/2020 06:38:38 AM
rw-r--r--
📄
PanelButton.ts
2.52 KB
02/20/2020 06:38:38 AM
rw-r--r--
📄
Tooltips.ts
1.23 KB
02/20/2020 06:38:39 AM
rw-r--r--
📄
UiFactory.ts
5.48 KB
02/20/2020 06:38:39 AM
rw-r--r--
Editing: NavigableObject.ts
Close
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import { AlloyTriggers, Behaviour, Focusing, NativeEvents, Tabstopping } from '@ephox/alloy'; import { Fun, Id } from '@ephox/katamari'; import { Class, SelectorExists } from '@ephox/sugar'; import { ComposingConfigs } from '../alien/ComposingConfigs'; const beforeObject = Id.generate('alloy-fake-before-tabstop'); const afterObject = Id.generate('alloy-fake-after-tabstop'); const craftWithClasses = function (classes) { return { dom: { tag: 'div', styles: { width: '1px', height: '1px', outline: 'none' }, attributes: { tabindex: '0' // Capture native tabbing in the appropriate order }, classes }, behaviours: Behaviour.derive([ Focusing.config( { ignore: true }), Tabstopping.config({ }) ]) }; }; const craft = function (spec) { return { dom: { tag: 'div', classes: [ 'tox-navobj' ] }, components: [ craftWithClasses([ beforeObject ]), spec, craftWithClasses([ afterObject ]) ], behaviours: Behaviour.derive([ ComposingConfigs.childAt(1) ]) }; }; // TODO: Create an API in alloy to do this. const triggerTab = function (placeholder, shiftKey) { AlloyTriggers.emitWith(placeholder, NativeEvents.keydown(), { raw: { which: 9, shiftKey } }); }; const onFocus = function (container, targetComp) { const target = targetComp.element(); // If focus has shifted naturally to a before object, the tab direction is backwards. if (Class.has(target, beforeObject)) { triggerTab(container, true); } else if (Class.has(target, afterObject)) { triggerTab(container, false); } }; const isPseudoStop = function (element) { return SelectorExists.closest(element, [ '.' + beforeObject, '.' + afterObject ].join(','), Fun.constant(false)); }; export default { isPseudoStop, onFocus, craft };