Skip to content
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

Bug after release 4.7.0 #161

Open
manusoftar opened this issue Jun 23, 2023 · 7 comments
Open

Bug after release 4.7.0 #161

manusoftar opened this issue Jun 23, 2023 · 7 comments

Comments

@manusoftar
Copy link

From that version and over to the latest version you added a left: 0 on the jquery.bootstrap-touchspin.css file which is breaking the visual.

Tha rule is both on line 10 and 19.

It's an easy fix, just remove both lines from the css file.

@istvan-ujjmeszaros
Copy link
Owner

Can you provide a screenshot of the visual error you are experiencing? Also, is it happening with BS3 or BS4?

@manusoftar
Copy link
Author

manusoftar commented Jun 24, 2023 via email

@istvan-ujjmeszaros
Copy link
Owner

istvan-ujjmeszaros commented Jun 25, 2023

Thanks for the details and for the effort. FYI the images didn't came through.

It is just a guess but you may be initializing TouchSpin on an inut with existing addons or something like that. left:0 indeed is required as there should be a wrapper around the element with the vertical buttons, with position:relative specified on it, and both left:0 and right:0 are required on the absolutely positioned vertical buttons to fill the relative wrapper.

There are HTML files under /__tests__/html/ in the project sources that I am using to check the rendering, you can take a look on those to see if you are experiencing the same error. If not, then you may double check how you are initializing the plugin. Feel free to add more details and if it is something fixable then I will look into it.

You can just download the source zip and run the html files locally.
https://github.com/istvan-ujjmeszaros/bootstrap-touchspin/archive/refs/heads/master.zip

@manusoftar
Copy link
Author

I fixed the images so you can see what that makes, how it looks when you have that left:0; which wasn't until 4.7.0 release.

And if you think it, it doesn't make sense, I mean, if you have position: absolute, and also right:0 (which is reasonable because the up/down buttons go on the right of the input field), if you also put left:0 then it will stretch those buttons to actually cover the total width of the parent element which is also the input's parent, and since the buttons have a higher z-index than the input, then they end up covering the whole input box.

Once again, until release 4.6.2 those left:0 where not present on your css, and it worked just fine, somehow those lines got introduced in your code after release 4.7.0 and remained there until now.

It's true I'm also using angular-touchspin which is basically a wrapper to use you "plugin" throug an angularjs directive but it shouldn't have anything to do with the issue because it doesn't add any css, just applies your plugin through a directive.

@istvan-ujjmeszaros
Copy link
Owner

istvan-ujjmeszaros commented Jun 25, 2023

Thank you for the additional details. FYI the vertical buttons were breaking out of the content box before v4.7.0, so I needed to re-structure the DOM, that's when a new wrapper was being introduced around the buttons (not around the input - you can check that if interested by downloading the source files and open one of the html files I have mentioned earlier).

My guess is that angular-touchspin is injecting its own HTML which is incompatible with the new version. I have never used Angular but will try to reproduce it. Until then, you can fix it by adding a definition like left: initial; to make it behave like left: 0 was never set.

@istvan-ujjmeszaros
Copy link
Owner

Yeah, here are the HTML that is being injected by angular-touchspin:
https://github.com/nkovacic/angular-touchspin/blob/master/src/components/touchspin/touchspin.directive.html

That should be updated at their end, would you mind opening an issue there? Or you can just use the left:initial trick if it makes it work as before.

@manusoftar
Copy link
Author

manusoftar commented Jun 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants