Skip to content

Commit

Permalink
#2575 open on focus (#2832)
Browse files Browse the repository at this point in the history
* #2575 open on focus

* Add type attribute to meridiem button (#2822)

Resolves #2820

* repl improvements

* repl improvements

* Fix typo in Finnish locale (fi.ts) (#2824)

Renamed Edelline -> Edellinen

* repl improvements

* repl improvements

* repl improvements

* repl improvements

---------

Co-authored-by: axunonb <[email protected]>
Co-authored-by: Pertti Roitto <[email protected]>
  • Loading branch information
3 people committed Jul 3, 2023
1 parent 207b437 commit eefc7d6
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 85 deletions.
2 changes: 2 additions & 0 deletions dist/js/tempus-dominus.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/js/tempus-dominus.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

153 changes: 68 additions & 85 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/js/tempus-dominus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ class TempusDominus {
'click',
this._toggleClickEvent
);
this.optionsStore.input?.removeEventListener(
'focus',
this._toggleClickEvent
);
}
this._toggle?.removeEventListener('click', this._toggleClickEvent);
this._subscribers = {};
Expand Down Expand Up @@ -440,6 +444,7 @@ class TempusDominus {
this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
if (this.optionsStore.options.allowInputToggle) {
this.optionsStore.input.addEventListener('click', this._toggleClickEvent);
this.optionsStore.input.addEventListener('focus', this._toggleClickEvent);
}

if (this.optionsStore.input.value) {
Expand Down
6 changes: 6 additions & 0 deletions test/test-utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ vi.doMock('../src/js/utilities/service-locator', () => {
};
});

// vi.mock('../src/js/utilities/service-locator', () => {
// return {
// serviceLocator: slm
// };
// });

import { serviceLocator } from '../src/js/utilities/service-locator';

/**
Expand Down

0 comments on commit eefc7d6

Please sign in to comment.