Skip to content

Commit 3d540e5

Browse files
author
Evan SUAU
authored
Merge branch 'master' into feat/search
2 parents bf3f369 + be1c81f commit 3d540e5

File tree

4 files changed

+9
-33
lines changed

4 files changed

+9
-33
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @cal-smith @zvonimirfras @magedhennawy
1+
* @cal-smith @zvonimirfras @magedhennawy @youda97

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,7 @@ Then we need to include carbon-components in `src/styles.scss`:
3131

3232
> *Note:* For offline usage we'll need to set `$font-path: '~carbon-components/src/globals/fonts';` at the very top of our `src/styles.scss`. This will copy the fonts to our `dist` folder upon successful build. If you like the fonts to be a part of your `assets` folder and not pollute the `dist` folder then copy the fonts from `node_modules/carbon-components/src/globals/fonts` into our app's `src/assets/fonts` folder and add `$font-path: '/assets/fonts/';` at the very top of our `src/styles.scss`.
3333
34-
Then set up our translations in `src/app/app.module.ts`:
35-
36-
```ts
37-
import { BrowserModule } from '@angular/platform-browser';
38-
import { NgModule } from '@angular/core';
39-
40-
import { AppComponent } from './app.component';
41-
42-
@NgModule({
43-
declarations: [
44-
AppComponent
45-
],
46-
imports: [
47-
BrowserModule,
48-
],
49-
providers: [],
50-
bootstrap: [AppComponent]
51-
})
52-
export class AppModule { }
53-
```
54-
55-
_Finally_ we can run `npm start` and start building out our application!
34+
That's it! Now we can run `npm start` and start building out our application!
5635

5736
> *Note:* This isn't the only way to bootstrap a `carbon-components-angular` application, but the combination of `@angular/cli` and the `carbon-components` scss is our recommended setup.
5837

src/dialog/overflow-menu/overflow-menu-pane.component.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import { I18n } from "./../../i18n/i18n.module";
1919
#dialog
2020
class="bx--overflow-menu-options bx--overflow-menu-options--open"
2121
role="menu"
22-
(focusout)="clickClose($event)"
22+
(focusout)="menuClose($event)"
23+
(click)="doClose()"
2324
[attr.aria-label]="dialogConfig.menuLabel">
2425
<ng-template
2526
[ngTemplateOutlet]="dialogConfig.content"
@@ -110,14 +111,10 @@ export class OverflowMenuPane extends Dialog {
110111
}
111112
}
112113

113-
clickClose(event) {
114-
// Opens menu when clicking on the menu button and stays open while navigating through the options
115-
if (this.dialogConfig.parentRef.nativeElement.firstChild.contains(event.target) ||
116-
this.listItems().some(button => button === event.relatedTarget) ||
117-
event.type === "focusout" && event.relatedTarget === this.dialogConfig.parentRef.nativeElement) {
118-
return;
114+
menuClose(event) {
115+
if (this.listItems().some(button => button === document.activeElement)) {
116+
this.doClose();
119117
}
120-
this.doClose();
121118
}
122119

123120
protected listItems() {

src/dialog/tooltip/tooltip.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { withNotes } from "@storybook/addon-notes";
33
import { action } from "@storybook/addon-actions";
44
import { withKnobs, boolean, object } from "@storybook/addon-knobs/angular";
55

6-
import { DialogModule } from "../../";
6+
import { DialogModule, PlaceholderModule } from "../../";
77

88
storiesOf("Tooltip", module)
99
.addDecorator(
1010
moduleMetadata({
1111
imports: [
12-
DialogModule
12+
DialogModule, PlaceholderModule
1313
]
1414
})
1515
)

0 commit comments

Comments
 (0)