Skip to content

Bugfixes for Firefox and Safari - #20

Open
whamtet wants to merge 3 commits into
wwilsman:masterfrom
whamtet:master
Open

whamtet wants to merge 3 commits into
wwilsman:masterfrom
whamtet:master

Conversation

@whamtet

@whamtet whamtet commented May 9, 2024

Copy link
Copy Markdown

Great work @wwilsman ,

I've fixed two bugs and refactored tmpl so that it no longer uses with which is deprecated. Shout out if you have any other suggestions!

Matt

Comment thread src/defaults.js
'<%= renderHeader() %>',
'<%= renderTimepicker() %>',
'<%= renderCalendar() %>',
'<%= obj.renderHeader() %>',

@whamtet whamtet May 9, 2024 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The templating syntax is slightly uglier now, but doesn't require with any more because it's deprecated.

Comment thread src/index.js
_onclick(e) {
let el = e.target

if (el.nodeName === 'OPTION') {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clicking Select on Firefox returns <option> as the target not <select>.

Comment thread src/defaults.js
'<span class="datepicker__field"><%= renderMinuteSelect() %></span>',
'<span class="datepicker__field"><%= renderPeriodSelect() %></span>',
'<span class="datepicker__label"><%= obj.label %></span>',
'<span style="display: inline-flex">',

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One extra span to fix display issue in Safari

Comment thread src/index.js
part = 'start'
}

const t0 = x => (x || x === 0);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 is falsy in js so we need to check for the 0 condition

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant