hauleth / hauleth/vanilla-ujs

disable_with does not work with Safari

Open
#32 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
195
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I have the following in Rails 4.2.

`<%= link_to "Add new post", new_post_path, data: { disable_with: "Please wait..." } %>`

Tested on other browser is fine except Safari. On Safari, it doesn't change the text to `Please wait...`, and is still clickable multiple times and fire to controller multiple times.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Safari behavior using the Rails 4.2 link_to example with data-disable-with, then trace the disable_with handling in vanilla-ujs. Done means the link changes to “Please wait...” and repeated clicks do not fire the controller multiple times in Safari, while existing browser behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.