Comments (4)
@martinpesout the way like this i think:
$(document).on('open', '.remodal', function () {
$('input').attr('tabindex', "-1");
$('.modal-form input').each(function(index, input) {
input.tabIndex = index + 1;
});
});
$(document).on('close', '.remodal', function () {
$('input').each(function(index, input) {
input.tabIndex = index + 1;
});
});
I don't know maybe the code above is too complicated, but i think it should work. Anyway look at remodal's events like close, open and etc. You can check them here: https://github.com/VodkaBears/Remodal#events
from remodal.
Yeah, you are right. I think that it could be solution. But it's necessary to include other form field elements. And also it's important to call next definition during open event.
$('.modal-form').find('input select textarea').first().focus();
from remodal.
yep.
from remodal.
Hi ,
I encountered the same issue and below logic helped me to resolve the issue.
// On the open of Modal window
//Updating the tabindex value to another attribute and make the tabindex =-1 which is the background
var inputs = $(document).find('select, input, textarea, button, a').filter(':visible');
$(inputs).each(function(){
var tbindex=$(this).attr("tabindex");
$(this).attr("data-index",tbindex);
$(this).attr("tabindex",-1);
});
// On the close of Modal window
//Re-update the tabindex value to from the attribute which you have set when you are opening the modal window.
var inputs = $(document).find('select, input, textarea, button, a').filter(':visible');
$(inputs).each(function(){
var tbindex=$(this).data("index");
if(tbindex){
$(this).attr("tabindex",tbindex);
}
});
from remodal.
Related Issues (20)
- Remodal inside Facebook iframe
- Remodal onload
- No longer actively maintained HOT 10
- Change responsibility web or mobile
- ***wrong post*** HOT 1
- blurry text when opening modal window HOT 2
- form label no checked
- you can use select2 in modal? HOT 3
- Check if modal has been closed once or destroyed HOT 2
- Multiple modal. HOT 1
- Won't trigger on SVG shapes in iOS (solution provided)
- Add no longer actively maintained message on plugin site HOT 1
- modal can't open again when modal closed twice HOT 2
- In IE11, remodal_obj.open() doesn't work properly
- Is there an React version of Remodal?
- New Functionality: send data to remodal from
- appendTo
- It's not working properly on Firefox for Mac HOT 2
- Chrome 80 HOT 1
- not working for netifly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remodal.