-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sliders (text-size, brush width, etc) are not draggable on iPad Safari #365
Comments
Thank you for raising an issue. Please make sure you have filled out issue respecting our form in English and given us as much context as possible. If not, the issue will be closed or not replied. |
I just wrote this runtime patch for the Tui Image Editor that adds HTML5 range inputs, sets-up event handlers, and hides the original touch-unfriendly-sliders: To use this, just call
Here's how it looks in Chrome 80 on Windows 10: While initially it isn't as pretty as the original custom slider, native range sliders can still be styled: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/ But with these styles:
It looks like this in Chrome, Firefox, Safari (macOS and iOS), and MS Edge (Chromium-based). |
The imageEditor with includeUI option was created without considering the mobile situation. Improvements may be included after internal discussions. |
This bug also affects Android tablets. |
I received a comment reply earlier today (that seems to have been deleted?) asking me to post the
I've updated the above reply to now include the definition of |
@Jehoel yes, i had added the commented. deleted it since i tried removing the function call and it woked all fine. What is it's use anyway? Also, unrelated, it seems like this library uses relative font size. Basically when I add text the default font size seems to be different for images with different dimensions. Is that something you have noticed? PS: your comments on your code are great. something i would try and incorportate into my own |
I know this is not a solution, but it can be an alternative that uses image editor on a smartphone. i added button to increase and decrease the brightness, you can also added some icon to increase and decrease the brightness. here is my code.
function brightness
and trigger button
|
I guess the problem is in this piece of code
The clicked slider element can't have extra classes, the comparison is for exact string and sometimes the element gets extra class like "tie-draw-range". Plus, the check is on event.target and the clicked element can be a sub element of the range slider. So this would solve it:
My temporary solution is to reset the className on the range element before click gets fired But actually, on top of that you also need to transform the touch event to a 'click' event
|
Describe the bug
The slider in the tools area (e.g. text size, draw brush size, rotation range, etc) cannot be manipulated at all using touch controls on my iPad - my users have to manually enter a number in the input-box to the side of the slider:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to drag the slider with my fingers and to tap any point on the slider trackbar/rail to make the slider thumb move directly to that location.
Screenshots
Smartphone (please complete the following information):
MTHN2LL/A
)Additional context
Is there a reason you're using a custom control using scripts and
<div>
instead of using HTML5's<input type="range" />
?I noticed that when entering a value directly into the input box to the right there is no indication that the input box has focus and the displayed value doesn't update until you press the [Enter] key. I see that this is an
<input type="text" />
. Please change this to<input type="number" min="0" max="30" />
so that browsers can prevent invalid input with native UX.Additionally, that
<input />
next to the range slider should not wire-up thekeyup
,keydown
, andblur
events because those won't be fired by all types of user-interaction (e.g. pasting a value won't work), instead it should only use theinput
event (don't handle thechange
event either because that only fires when the input loses focus).The text was updated successfully, but these errors were encountered: