Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Restore Missing fileInputId Property and Add acceptedFileTypes Property#1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
chadrschroeder wants to merge4 commits intobasecamp:main
base:main
Choose a base branch
Loading
fromchadrschroeder:issue_1088
Open
Show file tree
Hide file tree
Changes from2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added.DS_Store
View file
Open in desktop
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove this file, please?

Choose a reason for hiding this comment

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

Removed. I've also updated.gitignore to help avoid this. I hope this is OK. I see it's included there inKamal.

Binary file not shown.
4 changes: 3 additions & 1 deletionsrc/trix/config/input.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,8 @@ import { makeElement, removeNode } from "trix/core/helpers/dom"

const input = {
level2Enabled: true,
fileInputId: `trix-file-input-${Date.now().toString(16)}`,
acceptedFileTypes: '*',
Copy link
Contributor

Choose a reason for hiding this comment

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

We prefer double quotes for strings. The linter should flag this.

Choose a reason for hiding this comment

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

Fixed.


getLevel() {
if (this.level2Enabled && browser.supportsInputEvents) {
Expand All@@ -12,7 +14,7 @@ const input = {
}
},
pickFiles(callback) {
const input = makeElement("input", { type: "file", multiple: true, hidden: true, id: this.fileInputId })
const input = makeElement("input", { type: "file", multiple: true, hidden: true, id: this.fileInputId, accept: this.acceptedFileTypes })

input.addEventListener("change", () => {
callback(input.files)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp