s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266
https://valencia.lbsfilm.at/midterm-presentation/
Other
932 stars 174 forks source link

Disabled buttons still can be clicked to send their events on iOS and iPadOS #320

Open AWSW-de opened 1 week ago

AWSW-de commented 1 week ago

Describe the bug Disabled buttons still can be clicked to send their events when using Safari on iOS or iPadOS. This seems to be OS or browser related because latest FireFox in Windows 11 or Safari in macOS 15.1 react as expected.

According to the library documentation disabled buttons should not only look like disabled to the user, they should not ‘fire’ their events when the ‘setEnabled(ID, false)’ is set.

Optically this seems to work, but in my last try is still fires the event when I click on the disabled button when using iOS or iPadOS.

buttonUpdateNowID = ESPUI.button("Update to the new software now", &buttonUpdateNow, ControlColor::Dark, "Start software update now", (void*)1);

ESPUI.setEnabled(buttonUpdateNowID, false); 

To Reproduce Steps to reproduce the behavior:

  1. Add a button similar like in the short code snippet above
  2. Click on the disabled button with Safari (iPadOS or iOS) and with Firefox (Windows 11) or Safari on macOS 15.1
  3. Check the reaction on the device.

Expected behavior A disabled buttons should not forward actions when someone clicks on it when it is not enabled.

Screenshots IMG_0422

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.