-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix for ipad #640
Closed
Closed
Fix for ipad #640
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests and example are broken
Trim out unused documentation
…gleState respectively - Fix issues with disabled, readonly, handleWidth and labelWidth
Remove calls to `.getDOMNode()`
In the off state, if you click on the label the switch does not toggle. This is because the offset is non-zero, which makes the difference non-zero, which makes switch behave as if it’s been dragged to the off state. The fix is to only calculate the state based on the difference if the switch was dragged. And it’s only dragged if the mouse has moved at some point after the initial dragStart. I took a look at the original bootstrap switch and it’s how it behaves too.
When using the switch, I get a massive height. It’s the same as the issue reported here: Bttstrp#360 As I understand it, height specifies the height of an element relative to its parent container, so 100% is the same height as its parent. http:https://www.w3.org/TR/CSS21/visudet.html#propdef-height However, I think it makes sense for a switch to be defined by its internal height (as dictated by its size / content).
Fix two bugs. One with the toggle behavior of the switch, and one with the height of the switch.
Previously when the state prop changed due to an update in the parent component, the switch would not toggle to the correct position. Now, with the use of componentWillReceiveProps, we pass the state prop to the value() method so it can be updated. This will probably work with other, currently immutable props.
Update changelog
In Safari, even with the opacity set to zero, the unfocused ON state `onColor` is only shown as a small square in the upper left hand corner of the on switch. Setting the checkbox visibility to `hidden` fixes the issue.
…example and the readme file.
Closes #28. Closes 26
_updateContainerPosition should care about handleWidth 'auto' value to prevent error `NaN` is an invalid value for the `marginLeft` css style property
Allow to onText and offText to be a component
Closes #38
This patch fixes the PropTypes warning and closes #40.
Rebuild js
Can you rebase this correctly? |
? |
@graingert I do not sure that I understand how to rebase it. I created this PR not in the right repo, I have this issue in react-bootstrap-switch and not in bootstrap-switch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switch is working with bugs on real devices (for example iPad).
To fix we can put
onClick: this._getValue() ? this._handleOnClick.bind(this) : this._handleOffClick.bind(this)
in params in _renderLabel function. Is it make sense?