Events for Dropdown List on iOS 11 are available through the <select> option

When running my app built with ionic1 on iOS 11, I encountered a peculiar issue. The <select> tag dropdown list would appear in a native window, but none of the events were fired after the user selected an option. There seemed to be no way to properly confirm a change of selection.

Despite trying ng-change, ng-blur, and ng-focus, none of them seemed to work.

Below is a snippet of the problematic code:

<select ng-options="item as item.place for item in placesOfWork"
ng-model="currentPlaceOfWork.value"
ng-change="getChangingWorkPlace(currentPlaceOfWork)"
class="select-place-of-work">

Any assistance on this matter would be greatly appreciated. Thank you.

Update!

The issue has been resolved - it turns out I was missing the "Done" button on the native iOS select dropdown list. It seems there might have been an issue with cordova plugins.

Answer №1

Have you attempted using the $scope.$watch function?

You could create a function similar to this:

$scope.$watch("currentPlaceOfWork.value", function(nextValue, oldValue) {
if (nextValue != null && nextValue != oldValue) {
   // call your specific function
   $scope.getChangingWorkPlace(nextValue);
 }
});

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Creating interactive network visualizations using JavaScript

I've been in search of javascript code that can help me create a visual representation similar to this example. Specifically, I need something that can display links between boxes when clicked on or hovered over. I'm still not sure what this par ...

Attempting to retrieve data from an HTML response using Node.js

My goal is to extract the Email ([email protected]) from the HTML response using cheerio and puppeteer modules. However, I am retrieving unnecessary information which I do not need at all. It is located within the Class p2 in td/tr. when passing tr a ...

What is the best way to transfer data from MongoDB to Jade?

Whenever I try to access an object fetched from MongoDB using my client-side JS, I encounter a challenge. Specifically, my goal is to iterate through and utilize the arrays stored within the object. Below is the server-side JS code which effectively retrie ...

Showing a pop-up dialog box once a value has been selected

When the ajax autocomplete value is selected in a certain textfield, I want to display a message box. To achieve this, I am utilizing the jquery-confirm JavaScript library which can be found here. Below is my code snippet: select: function( event, ui ) { ...

Executing JQuery and Ajax calls within a loop

Can I dynamically change the variable in ("xxxxx").html(data) inside a for loop? I've been struggling to figure this out. My goal is to populate an HTML table with JSONP data from multiple ajax calls within a loop, where the URL changes each time. Wh ...

What is the best way to limit dates on an angular-datepicker?

I'm having trouble setting the maximum and minimum date in angular-datepicker. For more information, you can visit the angular-datepicker link. <div date-picker="start" min-date="Date string | Expression" max- date="Date string | Expression">&l ...

"Is there a way to retrieve the file size from a source on a different site

Hey everyone, I'm pulling src's from another website and have them in an array like ["www.another.com/pic1.png", "www.another2.com/pic2.jpg"]. I tried using XMLHttpRequest and checking the file.size, but CORS restrictions are preventing me from ...

Order of Execution for Nested Promises

Curious about nested promises, I came across this coding challenge in my tutorials. Can someone shed some light on the execution order of this code? new Promise((resolve) => { new Promise((res) => { console.log("c"); resolve(3); ...

Node.js encountered an issue: Dependency 'mime-types/node_modules/mime-db' cannot be located

Recently, I followed a tutorial on creating a CRUD App with Nodejs and MongoDB. The project was completed successfully and everything was working fine. However, when I attempted to move all the files and folders to a new directory, disaster struck. Now, w ...

What is the best way to change a byte array into an image using JavaScript?

I need assistance converting a byte array to an image using Javascript for frontend display. I have saved an image into a MySQL database as a blob, and it was first converted to a byte array before storage. When retrieving all table values using a JSON ar ...

What are some methods for displaying images retrieved from an API onto an HTML webpage?

Problem: The image is not appearing on my HTML page. How can I fix this issue? Please see below for details. https://i.sstatic.net/XYoHg.png Here are the code snippets I am using to display the image: <div class="col-md-7"> <div c ...

Struggling to retrieve information using the filter() method in MongoDB

I am currently attempting to retrieve the tasks assigned to a specific user using this setup router.get('/all', auth, async (req, res) => { try { const assignments_raw = await Assignment.find({listP: listP.indexOf(req.user.userId)}) ...

What is the best way to implement auto-saving functionality for multiple form fields in a React application?

Whenever I make changes to the first and second columns of an item in a text field, the onBlur event triggers an auto-save. This results in the entire row being reloaded due to the update caused by the first column's save. Is there a way to prevent t ...

Enhancing next-auth and i18n functionality with middleware in the latest version of next.js (13) using the app

Currently, I have successfully set up next-auth in my next.js 13 project with app router, and it is functioning as expected. My next step is to incorporate internationalization into my app following the guidelines provided in the next.js documentation. How ...

JavaScript inserted into debug console by developer

Is there a method to troubleshoot code that has been added through the firefox developer console terminal? For example, I added document.onkeydown = function(event) { // code logic for checking keys pressed } If only I could determine which .js file t ...

Automatically fill in form fields with data from a JSON file as soon as the user enters a value

How can I retrieve the bank name, branch, city, and district from a JSON array? Below is the contents of my results.json file: { "ifsc": [{ "ifsc": "PUNB0000100", "bank": "PUNJAB NATIONAL BANK", "city": "ABOHAR ...

Leveraging the power of Auth0 and Prisma in aggregating user data

In my current project, I am developing a Next.js application with Auth0 as the authentication system. Users are authenticated using the standard middleware: import { withMiddlewareAuthRequired } from '@auth0/nextjs-auth0/edge'; export default wi ...

Steps to emphasize HTML content and store it in the database for later use

I am currently working on a project that involves highlighting selected text within an HTML page that is loaded using PHP + XSL transformation. While I have come across solutions for highlighting the current selected text, I require the functionality to sa ...

Storing API data in localStorage using VueJS: A step-by-step guide

As I work on practicing building a simple SPA with VueJS, one of my current tasks involves listening to an API and storing certain data in the browser's localStorage. However, my experience with VueJS is still limited, so I'm unsure about how to ...

Is there a way for my code to detect when a function and a timeout are in progress?

Is there a way to disable my button after just one click, or when the timeOut function is running? Currently, I have code that allows the button to be clicked only if my moneyValue is greater than money, and it's working perfectly. Now, within that sa ...