Skip to content

Mismatch Between JavaScript Toggle Class and CSS Class #4

@DeepanshuDadhich

Description

@DeepanshuDadhich

This causes two problems:

Tasks are not visually marked as completed when clicked.

The filter logic in filterTasks() (which depends on .completed) does not work properly.

Steps to Reproduce:

Add a task.

Click on the task to mark it completed.

Notice that no style changes are applied.

Switch to "Completed" filter — the task does not appear.

Expected Behavior:

When clicking a task, it should toggle the .completed class.

Task text should appear with line-through styling.

Filtering should correctly show/hide based on task status.

Fix Recommendation:
Update both places in the JavaScript code to use the correct class:

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions